SQL troubles... SELECT INTO
shwaip
bluffin' with my muffin Icrontian
I'm working on the SMx Stats page, and I'm trying to back up a table using the following:
"SELECT * INTO Old FROM Current"
It gives me the error:
"ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax"
It gives this error if I try to do it remotely, or if I'm in the mysql> server.
I've been using this as a resource, and I've used SQL in the past. Any clues as to why I'm getting this error?
"SELECT * INTO Old FROM Current"
It gives me the error:
"ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax"
It gives this error if I try to do it remotely, or if I'm in the mysql> server.
I've been using this as a resource, and I've used SQL in the past. Any clues as to why I'm getting this error?
0
Comments
INSERT INTO `newdb`.`newtable`
SELECT *
FROM `olddb`.`oldtable`
this is assuming both structures are the same