|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have a database in MYSQL that has a semicolon on the end. ie:
>> show databases; .... db1 db2 mytestdb; db3 .... >> I can't seem to drop this database, since the semicolon is part of the name. I've tried escaping it and passing the database name as a quoted string, neither of which worked. Does anyone know the syntax I'd need to drop this database? Thanks! b |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Mon, 07 Jan 2008 15:42:11 +0100, Reacher <brandon.g.jones@gmail.com>
wrote: > I have a database in MYSQL that has a semicolon on the end. ie: > >>> show databases; > ... > db1 > db2 > mytestdb; > db3 > ... >>> > > I can't seem to drop this database, since the semicolon is part of the > name. I've tried escaping it and passing the database name as a > quoted string, neither of which worked. Does anyone know the syntax > I'd need to drop this database? DROP DATABASE `mytestdb;`; Notice the backticks (`) instead of single quotes ('). -- Rik Wasmus |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
"Reacher" <brandon.g.jones@gmail.com> schreef in bericht news:d5996c0a-c3dd-4a8f-8415-7ed06f109457@c4g2000hsg.googlegroups.com... >I have a database in MYSQL that has a semicolon on the end. ie: > >>> show databases; > ... > db1 > db2 > mytestdb; > db3 > ... >>> > > I can't seem to drop this database, since the semicolon is part of the > name. I've tried escaping it and passing the database name as a > quoted string, neither of which worked. Does anyone know the syntax > I'd need to drop this database? > > Thanks! > b drop datavase `testdb;`; |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Jan 7, 8:46am, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
> On Mon, 07 Jan 2008 15:42:11 +0100, Reacher <brandon.g.jo...@gmail.com> > wrote: > > > I have a database in MYSQL that has a semicolon on the end. ie: > > >>> show databases; > > ... > > db1 > > db2 > > mytestdb; > > db3 > > ... > > > I can't seem to drop this database, since the semicolon is part of the > > name. I've tried escaping it and passing the database name as a > > quoted string, neither of which worked. Does anyone know the syntax > > I'd need to drop this database? > > DROP DATABASE `mytestdb;`; > > Notice the backticks (`) instead of single quotes ('). > -- > Rik Wasmus Thanks! Rails actually put the semicolon in there in the first place (someone had them in the YAML file) |
|
![]() |
| Outils de la discussion | |
|
|