as the subject line says, I would like to automatically create tables based on a list of tables in an excel, but if these are tables ending with _ERR, I want to strip any non-null limitations (a flaw in the old system).
Is there a way to do that? Just the actual statement, the rest of the logic is covered.
So something like :
CREATE TABLE … LIKE ... SET NULLABLE
would be nice.
Thank you!
CREATE [ OR REPLACE ] TABLE <table_name> LIKE <source_table>
then use alter to remove the NULL.
ALTER TABLE t1 ALTER COLUMN c1 DROP NOT NULL;