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
 General SQL Server Forums
 New to SQL Server Programming
 select query

Author  Topic 

chiragvm
Yak Posting Veteran

65 Posts

Posted - 2007-08-27 : 07:29:46
hi to all

i have one problem regarding database
there are 2 database i can hendal only one database witch is at my local machine

in usermaster table one auto generate collum
and 5 recod is inserted in both database with relative keys
but i delete 3 recod in my local machine


now the problem is when i insert record in database in local machine is inserted and uid = 4 but in second database uid = 6 so i can not manage data

i want to gating one number wich is allocating to next record in uid
currently i am doing gating count of entry and +1 for the number

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-08-27 : 08:13:23
use identity type column.
read about it in books online = BOL = sql server help.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -