IS VIEW EXISTS
The IS VIEW EXISTS
check whether a view exists in a specified schema within the database.
Syntax
SELECT is_view_exists(<'schema_name'>, <'view_name'>)
Arguments
Parameter |
Description |
---|---|
|
The schema to search for the view within |
|
The name of the view to check for existence |
Returns
1
if view exists0
if view does not exist
Example
SELECT is_view_exists('public', 'my_view');
-----
1