>Description:
When one uses the "alter table tbl_name rename [to] new_tbl_name" command, it works
when "to" is not included in the command, but says there is an error in the SQL syntax
when "to" is included. My understanding is that "to" is optional and it should work
both ways.
>How-To-Repeat:
mysql> create table foo (id int);
Query OK, 0 rows affected (0.02 sec)
mysql> alter table foo rename to bar;
ERROR 1064: You have an error in your SQL syntax near 'to bar' at line 1
mysql> alter table foo rename bar;
Query OK, 0 rows affected (0.01 sec)
>Fix:
Don't use "to."
>Submitter-Id: <submitter ID>
>Originator: Geordy Kitchen
>Organization:
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:
>Severity:
>Priority:
>Category: mysql
>Class:
>Release: mysql-3.22.32 (Source distribution)
>Environment:
System: Linux okcomputer 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i686 unknown
Architecture: i686
Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs
gcc version 2.95.2 20000220 (Debian GNU/Linux)
Compilation info: CC='gcc' CFLAGS='-O2 -fomit-frame-pointer' CXX='g++'
CXXFLAGS='-O2 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti'
LDFLAGS=''
Configure command: ./configure --enable-shared --without-readline --enable-assembler
--with-mysqld-user=mysql --with-unix-socket-path=/var/run/mysqld/mysqld.sock
--prefix=/usr --exec-prefix=/usr --libexecdir=/usr/sbin --sysconfdir=/etc/mysql
--datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr/share/info
--includedir=/usr/include --mandir=/usr/share/man
Perl: This is perl, version 5.005_03 built for i386-linux
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php