Re: mysql table rename
| From: | I.Cividanes | Date: | Thu, 10 Feb 2005 18:42:17 +0000 |
| Subject: | Re: mysql table rename | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-25554@lists.php.net to get a copy of this message | ||
Patrick Roane escribió:
I am trying to rename my table, but I get a syntax error. ALTER TABLE myblobs RENAME myBlobs; Can anyone tell me where the problem is here? I went to the mysql ref. site and I think this is the right way to do this. thanks- ===== Patrick Roane Web design and development www.franklin-band.com Fox River Grove, Il.This is a typical Windows problem. If you read carefully the paragraph in MySQL docs, it says: << If you use ALTER TABLE tbl_name RENAME TO new_tbl_name without any other options, MySQL simply renames any files that correspond to the table tbl_name... >> What's happening? It's easy to understand if you look at the words "simply renames any files". As you know in Windows filesystems "myblobs" and "myBlobs" are the same filename. So simply rename the table to any other name and then rename it back to "myBlobs". I.e. ALTER TABLE myblobs RENAME foo; ALTER TABLE foo RENAME myBlobs; That's all folks. I.Cividanes (icividanes at gmail dot com) PHP Developer