As a preface, I am not very good at T-SQL syntax.
I would like to create a simple SQL script that will do 3 insert statements.
Insert A
Insert B
Insert C
Paste The application identifier or "ID" is required in the Paste instruction. And both Insert C and B identifiers are required in Insert C.
The pseudocode will look something like this:
INSERT INTO tableA
VALUES ('blah', 'blah')
INSERT INTO tableB
VALUES (IDENTITY_FROM_A_INSERT, 'foo')
INSERT INTO tableC
VALUES (IDENTITY_FROM_A_INSERT, IDENTITY_FROM_B_INSERT)
How can I write this script?
source
share