Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Dima Rasnitsyn (rasnitsn@milcse.rtsg.mot.com) wrote:
: Hi!
: Could anybody suggest me some SQL trick for selecting rowid of row with a max
: value in some column?
: I want to do
: SELECT rowid, max (col1)
: FROM mytable
: WHERE <my conditions>
Try this:
SELECT rowid
FROM mytable
WHERE <my conditions>
ORDER BY col1 DESC
And then fetch one row !
It runs, and it runs fast.
Michal Hobot
doctorQ Computers
doctorq@sam.nask.com.pl
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.