Click here to Skip to main content
15,898,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi we have list of items. each one have id's. i get one id in this list then how can i get next id in this list using stored procedure in sql 2012 or c# code
please help me




Thanks in advance..
Posted
Updated 7-Jan-13 20:45pm
v2

1 solution

sql
SQL
Select top 1 list.id
from list
where list.id > @id


or linq
C#
list.where(l=>l.id>yourId).orderby(l=>l.id).first()
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900