I have a database which has brackets in its name. (Don't ask! :-\ )
It shows in SSMS but not in Azure because it was canceled while creating. It does not show in the database listing in Azure. It shows in SSMS but it cannot be deleted by right-clicking. I'd like to drop it using SQL but I can't figure out the syntax to include the brackets as characters for the database name, as opposed to the escape/delimiter character.
I've tried the following to no avail:
drop database [xxx_2024-07-24]
Msg 911, Level 16, State 1, Line 1
Database 'xxx_2024-07-24' does not exist. Make sure that the name is entered correctly.
drop database [[xxx_2024-07-24]]
Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark after the character string '[xxx_2024-07-24]'.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '[xxx_2024-07-24]'.
drop database [[[xxx_2024-07-24]]]
Msg 911, Level 16, State 1, Line 1
Database '[[xxx_2024-07-24]' does not exist. Make sure that the name is entered correctly.
Any idea on the correct syntax to drop this database? [xxx_2024-07-24]
