Skip to content
Advertisement

What is the syntax error in this simple SQL query for creating a table?

I am trying out IntelliJ’s DataGrip to do some SQL work on a MariaDB database.

Somehow i cannot execute the query that was automatically created by DataGrip itself….

Can you help me find the error in it ?

The error is

I tried to validate the query with an online validator and it seems fine… Any suggestions ?

Advertisement

Answer

MariaDB and MySQL do not have a VARCHAR2 type (but Oracle does). Use plain VARCHAR and the error should go away:

Demo

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement