At 15:56, 19990819, Z Mehta wrote:
>Does anyone know how I can select the last row in the table?
>
>Something like this:
>
>SELECT * FROM submission WHERE Qno=lastrow ;
What do you mean "last row in the table"? Tables are sets - they
don't have any order, unless you impose it. So picking the last
row is meaningless. If you want the row that was most recently
updated, then you should use a TIMESTAMP column, and do this:
SELECT * FROM submission ORDER BY timestamp_column DESC LIMIT 1;
There are other ways to do it.
Tim