Incorrect syntax near (Msg 102)

The “Incorrect syntax near…” error appears if some symbol is missed. For example, the user decided to make a full database backup with the following command:

BACKUP DATABASE Adventureworks TO DISK 'full.bak'

Of course, an experienced user will immediately notice where a mistake was made. But if the error was not noticed the SQL Server will show the following message:

Msg 102, Level 15, State 1, Line 17
Incorrect syntax near 'full.bak'

SQL Server gives a hint that there is some symbol that was missed before ‘full.bak’. Everything that is needed to do is to add “=”:

BACKUP DATABASE Adventureworks TO DISK = 'full.bak'