Hello All,
I have MySQL 4.0.16 on Windows 2000 pro.
I am trying to create a table in an existing database.
according to the manual, I can use one of these statements:
6.5.3 CREATE TABLE Syntax
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)]
[table_options] [select_statement]
or
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(] LIKE old_tbl_name [)];
I am trying to use the second option. I have a table students and i want to create
another table students2 using the 'LIKE' students. Here are the results:
mysql> CREATE TABLE students2 LIKE students;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds
to your MySQL server version for the right syntax to use near 'LIKE students' at line 1
mysql> CREATE TABLE students2 (LIKE students);
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds
to your MySQL server version for the right syntax to use near 'LIKE students)' at line
1
1064 is ER_PARSE_ERROR
I tried all the tricks i know to no avail. I really don't see the error in this simple
command,!!!. Any help would be appricated.
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam