Hallo,
With IDENTITY(1,1) I can create an AutoIncrement Column.
I however need a column with a uniqueidentifier that is created whenever a
new datarow is created.
This is possible with access, but how can I create such a column via SQL?
Thorsten

Re: How to create unique identity columns? by Miha

Miha
Thu Mar 04 10:45:06 CST 2004

Hi Thorsten,

Are you talking about columns on server?
Sql server has IDENTITY keyword.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Thorsten Tarrach" <tho_public@gmx.de> wrote in message
news:uQK5RKgAEHA.1288@TK2MSFTNGP10.phx.gbl...
> Hallo,
> With IDENTITY(1,1) I can create an AutoIncrement Column.
> I however need a column with a uniqueidentifier that is created whenever a
> new datarow is created.
> This is possible with access, but how can I create such a column via SQL?
> Thorsten
>



Re: How to create unique identity columns? by Thorsten

Thorsten
Thu Mar 04 11:29:37 CST 2004

No, I'm using Access.

"Miha Markic [MVP C#]" <miha at rthand com> schrieb im Newsbeitrag
news:OuzUcggAEHA.2480@TK2MSFTNGP11.phx.gbl...
> Hi Thorsten,
>
> Are you talking about columns on server?
> Sql server has IDENTITY keyword.

True, but identity works only with int values. There is no way to create
GUIDs.


Re: How to create unique identity columns? by Miha

Miha
Thu Mar 04 12:39:32 CST 2004

Hi Thorsten,

Yes, seems that it is missing or at least well hidden.
As a workaround you might create GUIDs in code or use ADOX to create such a
column.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Thorsten Tarrach" <tho_public@gmx.de> wrote in message
news:ePrvG5gAEHA.3400@tk2msftngp13.phx.gbl...
> No, I'm using Access.
>
> "Miha Markic [MVP C#]" <miha at rthand com> schrieb im Newsbeitrag
> news:OuzUcggAEHA.2480@TK2MSFTNGP11.phx.gbl...
> > Hi Thorsten,
> >
> > Are you talking about columns on server?
> > Sql server has IDENTITY keyword.
>
> True, but identity works only with int values. There is no way to create
> GUIDs.
>