Sorry if you think my question is too basic, because i’m a newbie.
Lets say i have 1000 lines of query like this
x
INSERT INTO table (column1,column2,column3) VALUES (1,2,3);
INSERT INTO table (column1,column2,column3) VALUES (3,33,333);
.
I want to delete column2 with its value, Is there any way so that i dont need to delete 1000 rows manualy. Thanks.
Advertisement
Answer
Perhaps you want to completely drop the second column:
ALTER TABLE yourTable DROP COLUMN column2;
Although you may have used many statements to build up the data in your table, dropping a particular column only requires a one-liner.