Oracle Column Add, Resize/Modify, Drop


/*One Column */  ALTER TABLE customers ADD customer_name varchar2(45);

/*Multiple Columns*/ ALTER TABLE customers ADD (customer_name varchar2(45), city varchar2(40));


/*One Column*/  ALTER TABLE customers MODIFY customer_name varchar2(100) not null;

/*Multiple Columns*/ ALTER TABLE customers MODIFY (customer_name varchar2(100) not null, city varchar2(75));


ALTER TABLE customers DROP COLUMN customer_name;

Bonus: 🙂

ALTER TABLE customers RENAME COLUMN customer_name to cname;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: