CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_nameExample:
CREATE TEMPORARY TABLE tmp_tbl as (SELECT * FROM tbl)Table with name tmp_tbl is created with the same columns and data is copied from tbl.
You can do the same with using LIKE:
CREATE TABLE tmp_tbl LIKE tblBut, again you will need another query for inserting data.
No comments:
Post a Comment