Reputation: 1
I am trying to insert values into a table:
INSERT INTO EMP VALUES (7876,'ADAMS','CLERK',7788,convert(datetime,'13-JUL-2019',101),1100,NULL,20);
But I receive the error below:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''13-JUL-2019',101),1100,NULL,20)' at line 1.
Tried different syntaxes, however I couldn't solve this. Please some one help. Thank you.
Upvotes: 0
Views: 236
Reputation: 9070
The convert(datetime,'13-JUL-2019',101)
syntax is for MS SQL Server / Sybase.
Instead, use STR_TO_DATE
.
Upvotes: 1