N
N
nihi1ist2020-08-30 06:55:22
SQL Server
nihi1ist, 2020-08-30 06:55:22

How to properly escape a database name with a dash in MS SQL 2017?

There is a database in MS SQL 2017. The created database has switched to the "Recovery Pending" state. I found the script, but the database was unknowingly created with a dash in the name. And when you try to escape the name of the database, it gives a syntax error. Tell me how to correctly escape the name of the database with a dash?

PS At the same time, please tell me a way to get the database out of the above state.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2020-08-30
@nihi1ist

Overview of Recovery Processes .

how to escape db name
Square brackets.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question