Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Srno EmpNumber
1 1
1 2
1 3
1 4
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 12
2 13
2 14
2 15
2 16
2 17
2 18
2 19
2 20
3 1
3 2
3 3
3 4
3 5
Posted
Comments
PIEBALDconsult 8-May-15 12:31pm    
I sure hope you are not trying to do that in order to find out what the next EmpNumber should be -- that will fail horribly in may cases.
Why database system?

Try like this,
SQL
select MAX(EmpNumber) from Table1

For more info you may refer here,
http://www.w3schools.com/sql/sql_func_max.asp[^]
 
Share this answer
 
C#
var maxValue = _enumerable.Max(item =》 item.EmpNumber);
 
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