C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







how to select last inserted record in sqlserver2005


Posted Date: 23 Jul 2008    Resource Type: Code Snippets    Category: SQL

Posted By: Aradhana Kumari       Member Level: Gold
Rating:     Points: 2



//how to select last inserted record from a table in sqlserver 2005
create stroreprocedure selectlastrecord
@sd varchar(50),
@as varchar(50)
AS
BEGIN
insert into add1(name,roll) values(@sd,@as)
SELECT IDENT_CURRENT('add1');
//SELECT @@IDENTITY
END
GO
--exec hggh 'kkl','jhjh'
Output wil give the last inserted record




Responses

Author: Nirupa Rani Acharya    27 Jul 2008Member Level: Bronze   Points : 0
Thanks 4 dis code. plez share ur knowledge with us...


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Work in Microsoft  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Rounding numbers in MS SQL
Previous Resource: SQL Query to Find the Nth highest Colum Value in a Table.
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

efax

Contact Us    Privacy Policy    Terms Of Use