Avoiding spaces 

If you use spaces in a database name or database object, then you will always need to use backticks around that name when querying. 

The following code block would return Error Code: 1146. Table 'databasename.table' doesn't exist:

SELECT column1 FROM databasename.table name; 

The queries would run successfully with the corrections in the following sample syntax:

SELECT column1 FROM databasename.`table name`;
In Oracle, PostgreSQL, and SQL Server, you can enclose objects with spaces in double quotes, as in SELECT column1 FROM databasename. "table name";.

In SQL Server, you can also use square brackets around an object name that has spaces, as in 
SELECT column1 FROM databasename.[table name];.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.27.45