Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 What is the difference bet primary key & uniqueidentifier

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-16 : 09:35:10
puriamrik writes "1. What is the difference between primary key & uniqueidentifier
in SQL Server.

2. Can we Delete Primary Key value if it is Foreign key in another
table.


Plz. help me.

Thanks.

Regards
Amrik...."

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-08-16 : 09:58:05
1.primary key - is a constraint which ensures that column contains unique non-null values used to identify rows in a table. Primary key automatically creates a unique index on that column.

uniqueidentifier - is a data type used to store GUID values, however it allows NULLS and does not create any index automatically.

2. Primary key value can only be deleted when it is referred as foreign key in other table is when CASCADE DELETE option is specified.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-08-16 : 12:17:07
Job interview question?


CODO ERGO SUM
Go to Top of Page
   

- Advertisement -