I’ve got the following table in MySql:
Contact:
- Id
- Name
- FirstName
- …
Now, I’m writing an INSERT INTO in my c# program, but the Id column is defined to auto increment, so my statement looks like this:
INSERT INTO Contact (Name, FirstName) VALUES (“Sander”, “Declerck”)
So how can I get the new value for my object?
Issue this query:
right after the
INSERT.