Perform UPDATE, ALTER,DELETE,DROP operations on table.

Update:

 

SQL> select *
2 from publisher;
NAME ADDRESS PHONE
--------------- -------------------- ----------
AJ PUBLISHER DARBE PUTTUR 9472308100
AB Book Company Mangalore 9632587412
Ram Publishers Bangalore 9874563215
Raj Books Shringeri 8542658965
Hanuman Books Puttur DK 9458547562
SQL> update publisher
2 set address='Kulai Mangalore'
3 where name='AJ PUBLISHER';
1 row updated.
SQL> select *
2 from publisher;
NAME ADDRESS PHONE
--------------- -------------------- ----------
AJ PUBLISHER Kulai Mangalore 9472308100
AB Book Company Mangalore 9632587412
Ram Publishers Bangalore 9874563215
Raj Books Shringeri 8542658965
Hanuman Books Puttur DK 9458547562

Alter:

 

SQL> desc DEPENDENT;
Name Null? Type
----------------------------------------- -------- ------------
ESSN NOT NULL VARCHAR2(20)
DEPENDENT_NAME NOT NULL VARCHAR2(20)
SEX VARCHAR2(20)
BDATE DATE
RELATIONSHIP VARCHAR2(20)

SQL> alter table DEPENDENT
2 add PHONE_NUMBER number(20);
Table altered.

SQL> desc DEPENDENT;
Name Null? Type
----------------------------------------- -------- ------------
ESSN NOT NULL VARCHAR2(20)
DEPENDENT_NAME NOT NULL VARCHAR2(20)
SEX VARCHAR2(20)
BDATE DATE
RELATIONSHIP VARCHAR2(20)
PHONE_NUMBER NUMBER(20)

 

Delete:

 

SQL> select *
2 from PUBLISHER;
NAME ADDRESS PHONE
--------------- -------------------- ----------
AJ PUBLISHER DARBE PUTTUR 9472308100
AB Book Company Mangalore 9632587412
Ram Publishers Bangalore 9874563215
Raj Books Shringeri 8542658965
Hanuman Books Puttur DK 9458547562
SQL> delete from PUBLISHER
2 where NAME='AJ PUBLISHER';
1 row deleted.
SQL> select *
2 from PUBLISHER;
NAME ADDRESS PHONE
--------------- -------------------- ----------
AB Book Company Mangalore 9632587412
Ram Publishers Bangalore 9874563215
Raj Books Shringeri 8542658965
Hanuman Books Puttur DK 9458547562

 

Drop:

 

SQL> select *
2 from works_on;
ESSN PNO HOURS
-------------------- ---------- ----------
0236 123 398
7894 123 398
0236 126 345
4126 125 320
0662 124 333
SQL> drop table works_on cascade constraints;
Table dropped.
SQL> select *
2 from works_on;
from works_on
*
ERROR at line 2:
ORA-00942: table or view does not exist