I have two tables. One is called dictionary, the other one is called tokendictionary.
the identity column in the dictionary corresponds to a column in the tokendictionary called dindx. Thus, when I make an entry in the dictionary, I need to make a corresponding entry in the tokendictionary such that the identity column in the dictionary equals the foreign key, dindx in the token dictionary. I know how to do this using TSQL in a MS SQL database.
Here is an example of the script I use:
DECLARE id int;
INSERT INTO [dictionary] ([code], [acute], [gender], [codetype], [codingsystem],[papplydate],[capplydate],[type]) VALUES
Select @id = SCOPE_IDENTITY();
INSERT INTO [tokendictionary] ([dindx], [token]) VALUES
( @id,'AUDIOMETRY AIR ONLY');
My question is, how do I do this in MYSQL?