Does MySQL allows to create database which has dot (.
) in its name?
I'm using MySQL 5.1.22.
Dot notation (sometimes called the membership operator ) qualifies an SQL identifier with another SQL identifier of which it is a component. You separate the identifiers with the period (.) symbol.
Open the MySQL Workbench as an administrator (Right-click, Run as Admin). Click on File>Create Schema to create the database schema. Enter a name for the schema and click Apply. In the Apply SQL Script to Database window, click Apply to run the SQL command that creates the schema.
Complex SQL actions are processed in sql language and will work fine, if the base is fine. These errors may more often be found in 3rd party software, so never ever use dots in every name of anything on sql server.
Correct Option: B The statement 'CREATE DATABASE database_name;' is used to create a database with the name 'database_name'.
You can't use the dot in a database name. Also, I'd avoid using it in any identifier. A common convention is to use underscore instead. It will serve the same purpose and will avoid a LOT of confusion. If you do have a good reason for using strange and otherwise-illegal characters in a table or field name, then you have to escape it.
to escape identifiers in MySQL, use the backtick:
SELECT `select`, `some.field name`, `crazy()naming+here` FROM `my-=+table`
Getting into the habit of backticking all field names regardless of whether you need to is a good practice in my opinion, but that's another story.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With