Last_Insert_Id()
Posted by: Twain Martin
Date: October 25, 2011 05:55PM

I am writing in C++, using ODBC.

In MS Sql this works,

"INSERT INTO Foo (Name) VALUES (?) SET ? = Scope_Identity()"

In MySql, this does NOT work,

"INSERT INTO Foo (Name) VALUES (?) SET ? = LAST_INSERT_ID()"

What gives?

I am using SQLBindParameter.

MySql gives me an "error in SQL syntax".

Ideas?

Options: ReplyQuote


Subject
Views
Written By
Posted
Last_Insert_Id()
1114
October 25, 2011 05:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.