mysql

SELECT LAST_INSERT_ID();

php

@mysql_insert_id();

mssql

select @@identity 


+ Recent posts