[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
SELECT INTO TABLE
MySQL Server doesn't support the Sybase SQL extension:
SELECT ... INTO TABLE ...
. Instead, MySQL Server supports the
SQL-99 syntax INSERT INTO ... SELECT ...
, which is basically
the same thing. See section INSERT SELECT
.
INSERT INTO tblTemp2 (fldID) SELECT tblTemp1.fldOrder_ID FROM tblTemp1 WHERE tblTemp1.fldOrder_ID > 100; |
Alternatively, you can use SELECT INTO OUTFILE ...
or
CREATE TABLE ... SELECT
.
From version 5.0, MySQL supports SELECT ... INTO
with user
variables. The same syntax may also be used inside stored procedures using
cursors and local variables.
See section 18.1.6.3 SELECT ... INTO
Statement.