Claudio,
Friday, June 14, 2002, 5:34:57 PM, you wrote:
CC> Is there a way to obtain max (or min) value in a query?
CC> Example:
CC> i want to know the last id in mytable table
CC> is there a way to do this query?
CC> something like
CC> select id from mytable where id = max;
CC> or something else?
[snip]
Is there a way to obtain max (or min) value in a query?
Example:
i want to know the last id in mytable table
is there a way to do this query?
something like
select id from mytable where id = max;
or something else?
[/snip]
Try -- select MAX(id) from mytable;
HTH!
Jay
sql, mysql, query
ca
Is there a way to obtain max (or min) value in a query?
Example:
i want to know the last id in mytable table
is there a way to do this query?
something like
select id from mytable where id = max;
or something else?
The one i wrote i tried it but it does not work.
Thank you
Claudio
-