DROP query throws error even when IF EXISTS is present in the query #644
-
Here is a code snippet to drop a database: await this.pool.query(
sql.typeAlias("void")`DROP DATABASE IF EXISTS ${sql.identifier([
databaseName,
])} WITH (FORCE)`
); I was expecting this to not throw an error when the database doesn't exist (given the
Extra info: I am using If anyone can help me, I would appreciate it! Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
SimonWoidig
Sep 16, 2024
Replies: 1 comment
-
My mistake - was connecting to the wrong database and I didn't see it. 😵💫 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SimonWoidig
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My mistake - was connecting to the wrong database and I didn't see it. 😵💫