Back to articles list
- 1 minutes read

Tip #5 – How to quote table names in generated SQL script

Sometimes, you want all identifiers in your SQL script to be quoted. For example, you want them to have a particular case. Luckily, Vertabelo allows you to quote all SQL identifiers in your generated script to prevent you from any SQL name conflicts.

Go to your model:

Open your database model in Vertabelo

Click the SQL generation settings tab in the Model properties panel on the right:

Expand the ‘SQL generation settings’ section

Check Quote all SQL identifiers:

Check ‘Quote all SQL identifiers’

If you want to check out the result, select any table and click the SQL preview button:

To check the result, select a table and click the ‘SQL preview’ button

Now, you can see that all identifiers are quoted:

All identifiers in your SQL code are quoted. The above example is for MySQL database that uses backticks to distinguish identifiers

Note that since the above sample model was created for MySQL, the identifiers are quoted with backticks, i.e., `reservation_type_id`. For other database engines (that are ANSI-compliant) double-quotes will be used, i.e., "reservation_type_id". The following example is for PostgreSQL:

PostgreSQL uses double-quotes to distinguish identifiers

 
 
go to top

Our website uses cookies. By using this website, you agree to their use in accordance with the browser settings. You can modify your browser settings on your own. For more information see our Privacy Policy.