I have two temp tables where results from a single table are stored with different filtering applied.
INSERT INTO TEMP1
SELECT *
FROM MYTABLE
WHERE MYTABLE.ID = x;
INSERT INTO TEMP2
SELECT *
FROM MYTABLE
WHERE MYTABLE.ID = x
AND MYTABLE.NAME= y
Is there a way to do these two inserts with a single query?