May i know what is the MAX number Auto ID can go in a table for SQL server
'Depends on your datatype you use. Check out the capacities of the datatypes
INT, BIGINT, Decimal etc. in BooksOnLine.
--
Andrew J. Kelly SQL MVP
"Cason" <Cason@.cason.com> wrote in message
news:uie9yplAEHA.3352@.TK2MSFTNGP09.phx.gbl...
> May i know what is the MAX number Auto ID can go in a table for SQL server
> '
>|||A column with the IDENTITY property is limited only by the precision of the
underlying data type:
tinyint=127
smallint-32767
int=2147483647
bigint=9223372036854775807
decimal(38)=99999999999999999999999999999999999999
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Cason" <Cason@.cason.com> wrote in message
news:uie9yplAEHA.3352@.TK2MSFTNGP09.phx.gbl...
> May i know what is the MAX number Auto ID can go in a table for SQL server
> '
>|||Hi,
That depends up on the data type for which the column is associated.
Maximum limit for an autoid (Identity) is 2 power 63 that is
9,223,372,036,854,775,807. For this the data type should be BIGINT.
The below datypes are supported for Autoid (Identity)
1. Tinyint
2. Smallint
3. int
4. Bigint
1. Numeric
2. decimal
For Numeric and decimal scale shoule be '0' and it allows a maximum of
Numeric(38,0)
Thanks
Hari
MCDBA
"Cason" <Cason@.cason.com> wrote in message
news:uie9yplAEHA.3352@.TK2MSFTNGP09.phx.gbl...
> May i know what is the MAX number Auto ID can go in a table for SQL server
> '
>|||If you are speaking of an Identity column, it depends on the underlying data
type. if you use a bigint datatype with an identity with a seed and
increment of 1 then the maximum positive number is 9223372036854775808. If
you are looking at womething like a uniqueidentifier (GUID) I believe this
is unlimited...
Neil MacMurchy
Senior DBA
Regional Municipality of Niagara
"Cason" <Cason@.cason.com> wrote in message
news:uie9yplAEHA.3352@.TK2MSFTNGP09.phx.gbl...
> May i know what is the MAX number Auto ID can go in a table for SQL server
> '
>|||If under "Auto ID" you mean IDENTITY then it depends on the column's data
type.
For bigint:
Integer (whole number) data from -2^63 (-9,223,372,036,854,775,808) through
2^63-1 (9,223,372,036,854,775,807). Storage size is 8 bytes.
For decimal:
Fixed precision and scale numbers. When maximum precision is used, valid
values are from - 10^38 +1 through 10^38 - 1.
HTH
Igor Raytsin
"Cason" <Cason@.cason.com> wrote in message
news:uie9yplAEHA.3352@.TK2MSFTNGP09.phx.gbl...
> May i know what is the MAX number Auto ID can go in a table for SQL server
> '
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment