Dropping Columns and query user_unused_col_tabs
create table people(
employee_id number(9),
first_name varchar2(15),
last_name varchar2(20),
email varchar2(25),
constraint pk_people primary key (employee_id)
);
insert into people values (1, 'Tom', 'Kyte', 'YourName@q.com');
insert into people values (2, 'Sean', 'Viper', 'sdillon@q.com');
insert into people values (3, 'Christopher', 'Beck', 'clbeck@q.com');
alter table people
drop column first_name
/
alter table people
drop column last_name
/
select * from user_unused_col_tabs;
ALTER TABLE departments DROP UNUSED COLUMNS;
drop table people;
Related examples in the same category