it possible?
INSERT INTO table1 (SUB_ID, LR_ID)
SELECT ID, 3
FROM table2
WHERE ACTIVE = 'Y';
INSERT INTO table1 (SUB_ID, LR_ID)
SELECT ID, 4
FROM table2
WHERE ACTIVE = 'Y';
INSERT INTO table1 (SUB_ID, LR_ID)
SELECT ID, 5
FROM table2
WHERE ACTIVE = 'Y';
yes, i need in table1 for each ID 3 rows with different LR_ID: 3,4 and 5
INSERT INTO table1 (SUB_ID,LR_ID) SELECT ID, 3 FROM table2 WHERE ACTIVE = 'Y' union all SELECT ID, 4 FROM table2 WHERE ACTIVE = 'Y' union all SELECT ID, 5 FROM table2 WHERE ACTIVE = 'Y';
Обсуждают сегодня