List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 14 2002 3:24am
Subject:Re: Unsigned?
View as plain text  
At 3:10 +0000 3/14/02, Gary Griffiths (Citydesk) wrote:
>  Hi, sql,query
>
>Could someone please explain in detail or point me to where the detail can
>be explained in full the implications and benefits or otherwise of the
>attribute "UNSIGNED" in a field definition.

It means the column cannot contain negative numbers.  This shifts
the range of the colum upward.  (The maximum positive value becomes
roughly twice as large.)

On practical use is that you should always declare AUTO_INCREMENT
columns UNSIGNED.  Such columns don't hold negative numbers anyway,
so making the column UNSIGNED effectively doubles your maximum
sequence value.

>
>Thanks
>
>
>¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤
>Gary Griffiths (GG601)/Webmaster/Citydesk
>mailto:gary@stripped
>tel: +44 (0)1633 256999 | fax: +44 (0)1633 256702
>pgp: http://www.citydesk.co.uk/pgp/garypgp7031.htm
>¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤

Thread
Re: Unsigned?Gary Griffiths \(Citydesk\)14 Mar
  • Re: Unsigned?Paul DuBois14 Mar