1.How Many triggers can be applied to a table?
There are maximum 12 triggers can be applied to a table.
2. Difference between Syntax error & runtime error in PLSQL?
A Syntax error is easily identified by a PLSQL compiler.For example Incorrect spelling.
but runtime error can be handled with the help of Exception Section block in PLSQL.
3.How to disabled multiple triggers of a table at a time ?
Alter table Table_name disable all triggers.
4. Where is the pre defined procedures stored?
In oracle standard package,procedures,functions.
5.What is a cursor for loop?
Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor,fetches rows of a table values from active set into record variable
& it closes when all the records have been carried out process.
6.What is the difference between Procedure and function?
5.What is a cursor for loop?
Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor,fetches rows of a table values from active set into record variable
& it closes when all the records have been carried out process.
6.What is the difference between Procedure and function?
Function must return value and procedure does not.
Function can be used in sql with some restrictions. where as procedure can not be called directly from sql.
7.Find out the First_name of the employee and the name of the departent for the employee who is
managing for worker employee_id is 124 ?
declare
fname employees.first_name%type;
dname departments.department_name%type;
begin
select first_name , department_name into
fname, dname
from employees join departments using
(department_id)
where employee_id = ( select manager_id from
employees where employee_id= 124);
dbms_output.put_line(fname);
dbms_output.put_line(dname);
end;
managing for worker employee_id is 124 ?
declare
fname employees.first_name%type;
dname departments.department_name%type;
begin
select first_name , department_name into
fname, dname
from employees join departments using
(department_id)
where employee_id = ( select manager_id from
employees where employee_id= 124);
dbms_output.put_line(fname);
dbms_output.put_line(dname);
end;
0 comments:
Post a Comment