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 2005 Forums
 Other SQL Server Topics (2005)
 Primary Key generation..

Author  Topic 

debforum
Starting Member

2 Posts

Posted - 2009-07-25 : 10:58:30
i want to generate a primary key for a table which is not depends on table data i.e. (state id,district id, subdivition id,block id or others id or max no etc..)

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2009-07-26 : 03:17:39
It is not clear from your sentence what you are trying to do. My best guess is 'identity column'
Go to Top of Page

debforum
Starting Member

2 Posts

Posted - 2009-07-27 : 07:02:22
I want to generate a key value by which i can easily identify each person of a country like India. But whenever i am trying to do that the key become longer longer, which is very difficult to use. Does 'identity column' is the proper solution for that?
Go to Top of Page

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2009-07-27 : 08:22:56
Your reply bears no resemblence to your first question. I'm even more confused now.
What I can say is that in order to uniquely identify everyone in India you will need at least 10 digits so I'm not sure what you are expecting and what is 'too long'.
An identity is just a unique identifier that increments. It's fast and guaranteed to work. Any other method is almost certainly going to be wrong or slow under load.
Can you rephrase your question? It's very hard to tell what you are trying to ask or do.
Go to Top of Page
   

- Advertisement -