In my database all tables are using a common table for Sequence(ID_Table).
TABLE_ID has two fields (Common_ID, Table_Name).
If I insert any record in the tab
For MySql use select LAST_INSERT_ID();
select LAST_INSERT_ID();