Click here to Skip to main content
16,018,818 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
how to select max id from database on form in winform
Posted
Comments
Sergey Alexandrovich Kryukov 28-Sep-13 3:04am    
What is that, for goodness sake?
—SA

SQL
Select Top(1) ID From Product Order By ID Asc
 
Share this answer
 
SQL
SQL MAX() Syntax

SELECT MAX(column_name) FROM table_name;
 
Share this answer
 
if you mean max ID from table then can be done via this query
SQL
select max(stdID) from tblStudent
 
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