I am having a problem with my database problem.. errr..
INSERT INTO Customer (CustomerName)
VALUES ('Joe Schmoe'); LAST_INSERT_ID();
I used something like that in my winform so this statement:
INSERT INTO Customer (CustomerName)
VALUES ('Joe Schmoe'); LAST_INSERT_ID();
-shows me the last inserted id in my customer column
I want to store the value that I can get into a variable so that whenever I put a value to its child table (foreign key) I will use what value that I have stored in my variable to my insert statement.
How can I store it in a variable or a control?