I am pretty sure MySQL does not have the INSERT INTO table OUTPUT [column value] that MSSQL does - http://msdn.microsoft.com/en-us/library/ms177564.aspx (or http://blogs.msdn.com/b/sqltips/archive/2005/06/13/output-clause.aspx)
What's an easy way to replicate this? (I am moving a MSSQL app to MySQL. The 'OUTPUT' is a unique identifier and a int currently, so maybe I could just SELECT MAX (int) and add one, and generate a UID prior to insert?)
Thanks
LAST_INSERT_ID. If no, SELECT MAX will have to do, indeed...LAST_INSERT_ID(): SET@logSqlId = SCOPE_IDENTITY();You can use logSqlId as an output parameter orSELECTfrom it. Also for future readers, consider Postgres if moving from one of the big commercial systems. Its capabilities are much closer to the high-end database systems and in some cases it surpasses them.