6

What is dialect?

and how to use it and generate it?

The IDE editor validation keeps telling "SQL dialect is not configured"

I use PHP + MySql and PhpStorm 8 IDE

Community
  • 1
  • 1
Eslam Sameh Ahmed
  • 3,792
  • 2
  • 24
  • 40
  • 1
    Did you look at the [docs](https://www.jetbrains.com/phpstorm/help/sql-dialects.html)? – aug Dec 28 '14 at 10:17
  • Relevant question: http://stackoverflow.com/questions/21012799/why-do-i-need-to-configure-the-sql-dialect-of-a-data-source – aug Dec 28 '14 at 10:18

2 Answers2

13

For those who search where to define specific SQL dialects for a project or for some files go to Settings ⇒ Languages & Frameworks ⇒ SQL Dialects

There were a window like this one and a dropdown menu on the last column to set that : enter image description here

onirix
  • 336
  • 3
  • 7
5

A SQL dialect is a particular implementation of the SQL standard. Dialects differ from database to database. For instance, Oracle has no LIMIT clause, while MySql does. In order for PHPStorm to do code assist and syntax highlighting, you need to configure the dialect you use. If you do not specify a dialect, PHPStorm will use the Generic dialect:

This means that no particular dialect is specified. As a result, basic SQL92-based coding assistance is provided including completion and highlighting for SQL keywords, and table and column names. Syntax error highlighting is not available. So the file contents are always shown as syntactically correct. Also, code reformatting isn't possible.

Further reference:

For an introduction to PHPStorm's DB feature, see

Gordon
  • 312,688
  • 75
  • 539
  • 559