Jump to content

Archived

This topic is now archived and is closed to further replies.

gladiator83x

Copy a MySQL Table

Recommended Posts

Hi All,


I tried to copy a table by using this line below but the duplicate table did not create--any suggestions?


$query ="CREATE TABLE commentstate2 SELECT * FROM commentstate";

Share this post


Link to post
Share on other sites
The problem is not in your query.

From the MySQL manual:
[quote]CREATE TABLE new_tbl SELECT * FROM orig_tbl;[/quote]

Look elsewhere.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.