Click here to Skip to main content
Sign Up to vote bad
good
Hi all,
 
I am using VS2008 and sqlserver 2008
 
I have two tables users and user_events . users table has a auto increment user_id .I want to retrieve that user_id and insert into user_events table.can anyone guide me through this . thanks in advance
Posted 4 Nov '12 - 3:43

Comments
ridoy - 4 Nov '12 - 9:49
don't expect code here,first try with google,there you found lot of links regarding this..

2 solutions

  Permalink  
Comments
Raghavanand - 5 Nov '12 - 8:11
Thanks sir for the reply
You can use SCOPE_IDENTITY() for returning auto increment value.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 495
1 OriginalGriff 273
2 Dave Kreskowiak 175
3 Mohammed Hameed 145
4 Mayur_Panchal 144
0 Sergey Alexandrovich Kryukov 8,123
1 OriginalGriff 6,173
2 CPallini 3,482
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 4 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid