MySQL Forums
Forum List  »  General

Re: How to make small tables from big table? (SELECT INTO doesn't seem to work)
Posted by: Peter Brawley
Date: April 13, 2018 11:33AM

> mysql does not support SELECT INTO

Wrong. See the manual page for Select, MySQL supports Select Into <variable_name> and Select Into Outfile.

> CREATE TABLE tbl_stuff01 LIKE tbl_stuff;
> INSERT INTO tbl_stuff01 SELECT * FROM tbl_stuff LIMIT 5 OFFSET 0;

Yes, that does in two statements what Create Table...Select does in one.

> I think you mixed up the definitions of OFFSET and LIMIT.

I didn't notice you'd used the Offset key word.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.