Oct 9, 2001 #1 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 ########
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 ########
Oct 9, 2001 1 #2 Broccoli2 MIS Mar 26, 2001 161 GB 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 Upvote 0 Downvote
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