Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

biggest value 1

Status
Not open for further replies.

curvv

IS-IT--Management
Jan 11, 2001
103
ZA
Hi,

If I got values 1,2,3,4,5,6 in a column, how do i get the biggest number?

i.o.w: SELECT * FROM tbl_table WHERE id is the biggest

thanx

######## CtN ########
 
Try
Code:
SELECT MAX(id) FROM tbl_table;
or alternatively, if you need all the columns,
Code:
SELECT * FROM tbl_table ORDER BY id DESC LIMIT 1;

Hope this helps
-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top