Link to home
Start Free TrialLog in
Avatar of Lawrence Avery
Lawrence AveryFlag for United States of America

asked on

NEWSEQUENTIALID() Function used in sql server table

I have created a table that has a Primary Key column with a Default  value of
newsequentialid() specified.
However, every time I insert into the table, the newsequentialid() function keeps generating the same value
0000 0000-0000-0000-0000-000000000000 . Thus failing to insert more than one row.
How do I get the newsequentialid() to create a new unique value?
Avatar of Brian Crowe
Brian Crowe
Flag of United States of America image

Please post your table creation script.
ASKER CERTIFIED SOLUTION
Avatar of Surendra Nath
Surendra Nath
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lawrence Avery

ASKER

See attached script. See the ID column how it is created in the Countries table
This file contains the script.
Countries-SQL.txt