Professional Documents
Culture Documents
Public : keyword
It represents all the users in server
Scott :
grant insert (empno,ename,job,deptno) on emp
to user1;
grant update(fee) on student to user2;
user1 :
insert into scott.emp(empno,ename,job,deptno)
values(1001,'RAM','MANAGER',10);
user2 :
update scott.student set fee = fee + 1000
where roll = 101;
DBA Users :
sys/sysdba
system/manager
>connect ram/ram123@oracle
In sys user :
>revoke connect,resource from ram;
>drop user hari cascade; -- removing user
Cascade : cut the links with other users
* All_users
It Holds the list of users available in server.
> desc all_users
> select * from all_users;
scott :
> desc all_tab_privs_made
> select * from all_tab_privs_made;
user1 / user2:
> desc all_tab_privs_recd
> select * from all_tab_privs_recd;
---------------------------------------------------------------
5. Transaction Control Langauge : ( TCL )
2. > insert
> update
> create ......... ( DDL )
* commit will release the resources in logical memory and improve the
performance of server.
> set autocommit on -- Automatically activates the commit stmt after every
DML stmt.
> delete from temp;
-- commit compleate
> set autocommit off ( default )
---------------------------------------------------------------
Rollback :
used to cancel the uncommited transactions( DML )
on database objects.
Not applicable for DDL stmts.
desc emp_pays
select * from emp_pays;
ecode basic da hra pf gross
desc einfo
select * from einfo; -- no rows