This is a nice trick:
INSERT INTO tblTable (rowName1, rowName2) SELECT 'val1', 'val2' UNION ALL SELECT 'val3', 'val4' UNION ALL SELECT 'val5', 'val6'
INSERT INTO tblTable (rowName1, rowName2)
SELECT 'val1', 'val2'
UNION ALL
SELECT 'val3', 'val4'
SELECT 'val5', 'val6'
This code will insert 3 rows into the table.
No comments:
Post a Comment