Home > Archive > MySQL ODBC Connector > April 2006 > Unsigned









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Unsigned
Yemi Obembe

2006-04-03, 7:32 am

------ =_Part_6888_16205630
.1144062628681
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

What does it mean declaring a table unsigned?
An example is a s below:

id smallint unsigned not null auto_increment

------ =_Part_6888_16205630
.1144062628681--
Jos Elkink

2006-04-03, 7:32 am

Hi Yemi,

It means the variable contains only positive values - otherwise one
bit would be used to denote whether it's positive or negative. From
the documentation:

SMALLINT[(M)] [UNSIGNED] [ZEROFILL]

A small integer. The signed range is -32768 to 32767. The unsigned
range is 0 to 65535.

Jos

On 4/3/06, Yemi Obembe <ray@ngbot.com> wrote:
> What does it mean declaring a table unsigned?
> An example is a s below:
>
> id smallint unsigned not null auto_increment


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com