Skip to content
Advertisement

PostgreSQL DROP VIEW IF EXISTS

In PostgreSQL when I run the command

I get the response:

Can anyone explain what this means? why the word ‘IF‘ instead of a response like: View view_name dropped ?

Advertisement

Answer

That’s not what PostgreSQL does. Demo:

Possibly you’re not using PostgreSQL proper, but rather a fork that has a different syntax for this operation. Check out the result of SELECT version();.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement