DBMS Exp 3
DBMS Exp 3
SQL> connect
Enter password:
Connected.
Table created.
2 ;
1 row created.
1 row created.
1 row created.
SQL> select * from t1;
ROLLNO AGE
---------- ----------
5 19
3 20
1 18
User created.
SQL> connect
Enter password:
ERROR:
SQL> connect
Enter password:
Connected.
SQL> connect
Enter password:
Connected.
2 ;
ERROR at line 1:
SQL> connect
Enter password:
Connected.
ROLLNO AGE
---------- ----------
5 19
3 20
1 18
Grant succeeded.
Grant succeeded.
SQL> connect
Enter password:
Connected.
select * from t1
ERROR at line 1:
ROLLNO AGE
---------- ----------
5 19
3 20
1 18
1 row created.
ROLLNO AGE
---------- ----------
5 19
3 20
1 18
6 18
SQL> connect
Enter password:
Connected.
Revoke succeeded.
SQL> connect
Enter password:
Connected.
ERROR at line 1:
SQL> connect
Enter password:
Connected.
Table created.
2 ;
1 row created.
1 row created.
1 row created.
ROLLNO AGE
---------- ----------
1 18
3 20
5 19
6 17
SQL> commit;
Commit complete.
ROLLNO AGE
---------- ----------
3 20
5 19
6 17
SQL> rollback;
Rollback complete.
ROLLNO AGE
---------- ----------
1 18
3 20
5 19
6 17
Savepoint created.
1 row deleted.
ROLLNO AGE
---------- ----------
3 20
5 19
Savepoint created.
1 row deleted.
SQL> select * from t2;
ROLLNO AGE
---------- ----------
5 19
Rollback complete.
ROLLNO AGE
---------- ----------
3 20
5 19
SQL>
Post experiment:
Table created.
SQL>
SQL> connect
Enter password:
Connected.
ENAME VARCHAR2(20)
ECOUNTRY VARCHAR2(20)
ECONTACT NUMBER(38)
ESALARY NUMBER(38)
User created.
SQL> grant insert on employee to nash\3;
ERROR at line 1:
Grant succeeded.
SQL> connect
Enter password:
ERROR:
SQL> connect
Enter password:
Connected.
SQL> connect
Enter password:
Connected.
1 row created.
1 row created.
SQL> connect
Enter password:
Connected.
ERROR at line 1:
Revoke succeeded.
SQL> connect
Enter password:
Connected.
ERROR at line 1:
SQL> connect
Enter password:
Connected.
2 ;
SQL> commit;
Commit complete.
1 row created.
SQL> savepoint a;
Savepoint created.
1 row created.
SQL> savepoint b;
Savepoint created.
SQL> rollback to b;
Rollback complete.
SQL> rollback;
Rollback complete.
SQL>