INSERT INTO table1 (column1, column2, column2); DECLARE @PK int; SELECT @PK = ( SELECT MAX(column1) FROM table1 ) INSERT INTO table2 (tabcol1, tabcol2, @PK);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)