[Interest] "Last selected row id" QSqlQuery?

André Somers andre at familiesomers.nl
Wed May 22 12:12:45 CEST 2013


Op 22-5-2013 10:25, Witold E Wolski schreef:
> How can I get efficiently the id of the last insterted row?
>
> A the moment I am using :
> SELECT MAX(id) from table.
> Which isn't efficient.
>
> How can i do it more efficiently but stay database agnostic.
>
> best
> Witold
What's wrong with QSqlQuery::lastInsertId() ?

André

-- 
You like Qt?
I am looking for collegues to join me at i-Optics!




More information about the Interest mailing list