Reputation: 5468
I'm running some SQL against an Azure SQL server, trying to drop a database.
drop database "GEO-Dev-Scheduler";
When I run this command against my Azure SQL database in the cloud, I get the error Incorrect syntax near '"'
. When I run it against my localdb
connection, it works fine.
According to this documentation, Azure SQL does support the DROP DATABASE
Transact-SQL command. I need to be connected to the master
database, which I am. The DROP DATABASE
statement has to be the only statement in the batch, which it is.
This page gives some examples of how DROP DATABASE
is used in Transact-SQL. Interestingly, none of those examples enclose the database name in quotes. My database name contains dashes, and when I tried removing the double quotes I got Incorrect syntax near '-'
. I also tried using single quotes as well as backticks just to thoroughly shotgun the problem.
Anyway, this SQL runs fine against localdb
so I'm a bit skeptical there's really a syntax error.
What could be the problem?
Upvotes: 1
Views: 1661