views:

91

answers:

2

For Example, is there any way to do something like the following:

INSERT INTO table2 VALUES(SELECT x FROM table1 WHERE x > 5 LIMIT 4)
+8  A: 

Remove VALUES and the brackets:

INSERT INTO table2 SELECT x FROM table1 WHERE x > 5 LIMIT 4
Graeme Perrow
+2  A: 
INSERT INTO SomeTable(column1, column2, column5)
SELECT x as column1, y as column2, a as column5
FROM differentTable
WHERE ....
Chris Marisic