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
Sign In
Register
AdSense Revenue
Gifts
Active Members
Today
vipul
(176)
ANIL PANDEY
(141)
UltimateRengan
(140)
Last 7 Days
UltimateRengan
(844)
D.Jeya kumar(J...
(745)
Athira Appukut...
(661)
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 2008
Member Level:
Bronze
Points
: 0
Thanks 4 dis code. plez share ur knowledge with us...
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
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
Getting Row Number from a Table in SQL-2000
Simple example of full join and cross join
How to find the maximum length a select statement can return using @@TEXTSIZE function
Delete Duplicate Records
Export/Import Data from Database to Excel sheet
dotNet Slackers
BizTalk Adaptors
Web Design
efax
Contact Us
Privacy Policy
Terms Of Use