Many databases have an equivalent to mysql_insert_id().
1) MySQL supports a subset of SQL92, with some extras
2) No. the SQL92 standard comes close, but not all databases support the full SQL92, and some databases have small differences from the SQL92 standard.
That is why you should seperate the SQL queries from the main code, and include that code depending on the database you use.
You'd have a group of queries for MySQL, and a group for Oracle, and a group for Informix. Then depending on which database you want to use, you'd include the group that is for that database.