I was wrong, it's not just INT that Identity can be on (so it's not
assumed)

You can also put Identity on bigint, decimal, numeric, smallint and
tinyint

It's an attribute of the field, not of the type

> -----Original Message-----
> From: Chunshen (Don) Li [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 12, 2004 11:20 AM
> To: CF-Talk
> Subject: Re:ID key in SQL table
>
>
> I believe with MS SQL Server, Identity is an attribute to INT
> data type, hence, the following works
>
> -- DDL
> -- col of INT type without identity attribute
> create table #tbl (col int primary key);
>
> -- DDL
> -- col of INT type with identity, default to 1,1 even without
> say Identity(1,1) create table #tbl2 (col int identity primary key);
>
> But this one won't
> create table #tbl3 (col identity primary key);
>
> >> Philip, I don't mean to be rude.  By the definition of
> Primary Key,
> >> the [ID] can not be NULL, hence, [ID] int identity Primary
> Key would
> >> do
> >
> >Actually, by definition an Indentity is an Int
> >
> >So "[ID] identity primary key" would do
> >
> >But if you want to get to the proper specifics, it should be
> >
> >[ID] int not null identity(1,1) primary key
> >
> >
> >
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to