Grant
Granting Privileges using the GRANT statement
The grant statement provides various types of access to database objects such as tables views and sequences.
Syntax:- GRANT object privileges on objectname to User name [with grant option];
Privileges
SELECT,INSERT,UPDATE,INDEX,ALTER,DELETE,ALL
With grant option
The with grant option allows the grantee to in turn grant object privileges to other users.
Ex:- Grant all on vision to vision;
Grant select on vision1 to vision;
Grant select,update on vision2 to vision;
Grant select,update,delete on vision3 to vision with grant option;
Vision user
Ex:- select * from scott.vision;
insert into scott.vision values(122,'sekhar',222);
select * from scott.vision1;
- insert into scott.vision1 values(4,7,'04-oct-02');
select * from scott.vision2;
update scott.vision2 set sal=sal+1000;
- insert into scott.vision2 values(220,’ppp’,2100);
select * from scott.vision3;
- insert into scott.vision3 values(220,20,2100);
update scott.vision3 set sal=sal+1000 where code=20;
delete from scott.vision3 where code=20;
- alter table scott.vision3 add(net number(5));
grant select on scott.vision3 to suri;
Suri screen After granting permissions from vision
- Select * from scott.vision3;
- insert into scott.vision(eno,sal) values(220.1220);
- Insert into scott.vision values(101,’raju’,3200);
Scott User
Ex:- grant insert(eno,sal) on vision to vision;
Select * from vision;
Vision User
For
Online Classes
Contact Us: +919885348743
Online Classes
Contact Us: +919885348743