Does MySQL allows to create database with dot?

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.

Leave a Comment