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?
Although it is possible to use backticks in MySQL to create all kinds of strange database/table/column names.
I strongly recommend against it. It’s just asking for trouble.
For example, are you happier with a database name with spaces in it? You have already realized that there are problems with it.
If you want to separate a name consisting of several words use underscore or an uppercase letter instead (note however that mysql on windows is not case sensitive on database/table names since windows hasn’t a case sensitive filesystem.
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.