What\'s the sql standard to get the last inserted id? If there is such a thing.
mysql: LAST_INSERT_ID()
postgresql: ... RETURNING f_id
mssql: SCOPE_IDENTIT
The one technique is likely to work with all DBs, and in circumstances where the sequence is not a simple incrementing number (e.g. there are pre-existing rows with high ids, so you can't use MAX), is:
nextval function or similar.