CIT365-Lab-Practice-Tutorial-04 - SQL DML - Manipulating & Inserting Data
CIT365-Lab-Practice-Tutorial-04 - SQL DML - Manipulating & Inserting Data
SQL-DML
Manipulating
&
Inserting Data
1 row created.
EMP
EMPNO ENAME JOB ... DEPTNO
r o w
SQL> DELETE FROM dept t e a e y
e l e ry ey k
2 WHERE deptno = 10; t d m a
a n no a pri ign k
u c i n s o re
Y o n t a a f .
co a s a b l e
t
DELETE FROM dept tha is used ther t
* a t a n o
ERROR at line 1:
th in
ORA-02292: integrity constraint (USR.EMP_DEPTNO_FK)
violated - child record found
SQL> UPDATE...
SQL> SAVEPOINT update_done;
Savepoint created.
SQL> INSERT...
SQL> ROLLBACK TO update_done;
Rollback complete.
Statement Description
INSERT Adds a new row to the table
UPDATE Modifies existing rows in the table
DELETE Removes existing rows from the table
COMMIT Makes all pending changes permanent
SAVEPOINT Allows a rollback to the savepoint marker
ROLLBACK Discards all pending data changes