Jump to content


Photo

Copy a MySQL Table


  • Please log in to reply
1 reply to this topic

#1 gladiator83x

gladiator83x
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts

Posted 23 July 2006 - 03:30 PM

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";

#2 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 23 July 2006 - 03:49 PM

The problem is not in your query.

From the MySQL manual:

CREATE TABLE new_tbl SELECT * FROM orig_tbl;


Look elsewhere.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users