| How can I create the database through query if the database name has blank spaces in it [message #1962] |
Sat, 29 September 2007 01:16  |
kalyan_askc Messages: 3 Registered: September 2007 Location: India |
Junior Member |
|
|
Hi All,
I am new to MySQL. I am using SQLYOG for database manipulations. I have a doubt regarding creation of database. When I tried to create a database "a b c" through the following query " create database 'a b c' " , I got an error message. But by clicking on the 'DB' menu in the menubar and selecting 'create database' menuitem, I am able to create the database 'a b c'.
Kindly let me know How can I create the database through query if the database name has blank spaces in it?
Regards,
A.S.Kalyan.
A.S.Kalyan
|
|
|
|
|
| Re: How can I create the database through query if the database name has blank spaces in it [message #1973 is a reply to message #1970 ] |
Mon, 01 October 2007 00:26   |
kalyan_askc Messages: 3 Registered: September 2007 Location: India |
Junior Member |
|
|
Hi Mike..
Glad to have some useful help here by you. I tried to follow your instructions. Though the statement "set sql_quote_show_create=1;" has worked fine but the statement for creating the database didn't. It has shown 1064 error, asking to check the manual. Can u pls send some other way to handle the problem?
I am facing some other problem too. As I have created some other databases from the GUI I developed in Java, they are not being updated concurrently. If u have an idea abt java, here is the code that I used to create the statement.
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSe t.CONCUR_UPDATABLE);
'con' is the connection to the mysql database here. If u can help me in some way, I'ld be thankful.
Regards,
A.S.Kalyan
|
|
|
| Re: How can I create the database through query if the database name has blank spaces in it [message #1974 is a reply to message #1971 ] |
Mon, 01 October 2007 00:29   |
kalyan_askc Messages: 3 Registered: September 2007 Location: India |
Junior Member |
|
|
Hi sterin,
Thank u for that suggestion but we have a task to create such databases too.
Regards,
A.S.Kalyan
|
|
|
| Re: How can I create the database through query if the database name has blank spaces in it [message #1975 is a reply to message #1962 ] |
Mon, 01 October 2007 00:44  |
mikec Messages: 22 Registered: September 2007 |
Junior Member |
|
|
Hi,
Not enough info to go on - get rid of the semicolon?
p.s.
I agree that spaces, caps, etc... are a really bad
idea for names of tables/columns, etc... you will pay
for it somewhere down the road.
|
|
|