we have a package and we have grants to execute that package inside of that we have table, here we don't have privileges to this table? whether this package will execute or not?

Answers were Sorted based on User's Feedback



we have a package and we have grants to execute that package inside of that we have table, here we d..

Answer / prativa mishra

Yes, this package will execute.
example:- suppose we have create a package inside any user
create or replace package sn_pck is
procedure sn_pr(c out number);
end;

create or replace package body scn_pck is
procedure sn_pr(c out number) is
begin
select b into c from sn where name='sony';
DBMS_OUTPUT.PUT_LINE(C);
END;
END;

after that you shd connect hr user
and execute that package it execute 100%

how u will execute on hr user:-

declare
e number;
begin
prativa.sn_pck(e);
end;

note:- here i hv created that package in a user named prativa
and in user i hv create a table sn

Is This Answer Correct ?    2 Yes 1 No

we have a package and we have grants to execute that package inside of that we have table, here we d..

Answer / mathivanan

Of course it wont, it will error out..

As per the question, the user is creating a package inside which he is accessing a table that he has no access to.

it will error out.

Is This Answer Correct ?    0 Yes 0 No

we have a package and we have grants to execute that package inside of that we have table, here we d..

Answer / shareen

select empno,deptno,ename,sal,case when deptno=10 then
sal+3000
when deptno=20 then sal+2000
when deptno=30 then sal+1000
else sal end from emp

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

what is the difference between char_length and length? : Sql dba

0 Answers  


Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.

0 Answers  


HOW TO APPEAR FOR ONLINE EXAMS OF SQL & PL/SQL? WHICH BOOKS WILL BE BETTER FOR REFERENCE TO QUALIFY THESE EXAMS? ARE THERE ANY MODEL PAPERS AVAILABLE IN THE MARKET ABOUT SQL & PLSQL?

2 Answers  


What is varchar data type in sql?

0 Answers  


Can we commit inside a trigger?

0 Answers  






What is the use of %rowtype?

0 Answers  


How do I upgrade sql?

0 Answers  


What is a function in oracle pl sql?

0 Answers  


i have a table like this. i want to output like this c1 c2 c1 c2 1 10 1 10 2 20 2 30 3 30 3 60 4 40 4 100 5 5 5 105 c1 and c2 are columns in a table .i want output like this c2 values are 10,10+20,10+20+30,10+20+30+40.10+20+30+40+5. write a sql query.pls help this i want urgent.

2 Answers   IBM, Loginworks, OFSS,


What are database links used for?

0 Answers  


can i use global variables in stored procedure or function

1 Answers   L&T,


What is a file delimiter?

0 Answers  


Categories