Is there any way to add a column to a table if this column is not there in the table?
like :
create table t(x integer,y varchar);
if not exists (select * from t where column_name =y) then alter table t add column y varchar .
//
alter table t add column y varchar; can add if y is not there, else it will give error rollback :......
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.