Let's say you have a very large table called MOVIES with this type of data
1* select movie_name,genre , comments from movies where rownum < 10 SQL> / MOVIE_NAME GENRE COMMENTS ------------------------- -------------------- --------------- The good The Bad The Ugly Western asdf Titanic Drama asdf Avatar Science Fiction asdf Gravity Science Fiction asdf Groundhog Day Comedy asdf junk as asdf The good The Bad The Ugly Western asdf Titanic Drama asdf Avatar Science Fiction asdf 9 rows selected.
Now you want to drop the column called "Comments". This is a two step operation
1. Set the column to be unused.SQL> alter table movies set unused (comments) 2 / Table altered. Elapsed: 00:00:00.24
2. Drop the column with this command.
SQL> alter table movies drop unused columns 2 / Table altered. Elapsed: 00:00:38.77 SQL>

Thanks for sharing this steps. I have learned how to drop the columns from the large table.
ReplyDeleteOracle Training in Chennai | Oracle course in Chennai | Oracle DBA Training in Chennai