Error Message in SQL Server due to Invalid Syntax near ‘on’

The MySQL information is provided as follows: To fix the issue, verify that the ‘project’ directory does not include unnecessary or temporary files within the MySQL data directory. I attempted to drop the key and its related FOREIGN KEY constraint, but the outcome remained unchanged.

Question:

Being a novice in utilizing
SQL Server
, I encountered an issue that resulted in the appearance of an error.

Error message MSDT_A1 occurred on State 1, Line 2 due to the presence of the keyword ‘on’ in close proximity, as indicated by MSDT_A2.

As you can view in this screenshot


Thanks


Solution:

Kindly eliminate the erroneous

;

that contains an incorrect
char marks
at the end of its statement. Additionally, consider appending this character at the conclusion of

CREATE DATABASE

statement.

CREATE DATABASE ... /*;*/ ON ......... aa.mdf');
                      ^                        ^
 delete (mandatory) --|    insert (optional) --| 

Frequently Asked Questions

Posted in Sql