May 9, 2008 at 4:36 am
suppose i hav employee name i want the sql command automatically genertae the distinct emp id....plz can any one help me ,wat will be the query for that
May 9, 2008 at 4:50 am
Please specify your table structure.
May 9, 2008 at 4:53 am
suppose i hav a table name as empdetail which has column as empname,empdesignation.I want to add a new column in this table as empid which will automatically generate by query when i insert name and designation in this table.
May 20, 2008 at 7:15 am
[font="Verdana"]Why don't you go then for Identity column? SQL Server will take care of it. For more information refere BOL.
Mahesh[/font]
MH-09-AM-8694
May 20, 2008 at 8:16 am
I agree... adding an IDENTITY column to the table will take care of it.
And, Sequence tables are notorious for causing deadlocks in SQL Server because most folks don't write the code for them correctly.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply