Reputation: 4295
When running automated scripts I want to be able to create a table only if it doesn't exist.
Is there a way for netezza
to evaluate this without throwing an error?
Upvotes: 2
Views: 2456
Reputation: 4295
Starting in 7.2.1 this can be achieved.
create table IF NOT EXISTS table_name
( field_name varchar(10))
Conversely
You can can use if exists
to only drop tables that exist.
drop table table_name if exists;
Upvotes: 4