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.
| Author |
Topic |
|
Arun.G
Yak Posting Veteran
81 Posts |
Posted - 2010-05-25 : 02:18:51
|
| I have one table which contains emp.id as autogenrated key.After inserting add, i want to display the emp.id of the added employee.The emp.id should also be prefixed with company name alsofor example.: ABB007how to do in sqlserver query? |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-05-25 : 02:25:14
|
| You can use one of the below methods to get the last identity value.@@IDENTITYIDENT_CURRENTSCOPE_IDENTITY()And you can do the concatenation in front end for company name. |
 |
|
|
|
|
|