Renato Bezerra
Renato Bezerra

Reputation: 886

MySQL SELECT INTO Equivalent?

In SQL Server, I can copy tables or temporary tables to new table, using a SELECT* INTO.. syntax.

Someone know how can I make this same action in MySQL?

Upvotes: 10

Views: 15768

Answers (1)

Dark Falcon
Dark Falcon

Reputation: 44201

See CREATE TABLE ... AS SELECT .... Note that this will not recreate indexes and foreign keys, as was already noted.

Upvotes: 14

Related Questions