Friday, September 26, 2008

parts of a database trigger and various types of database triggers

What are the parts of a database trigger ?
The parts of a trigger are:
A triggering event or statement
A trigger restriction
A trigger action

What are the various types of database triggers ?
There are 12 types of triggers, they are combination of :
Insert, Delete and Update Triggers.
Before and After Triggers.
Row and Statement Triggers.
(3*2*2=12)


Can you have two functions with the same name in a PL/SQL block ?
Yes.

Can you have two stored functions with the same name ?
Yes.

Can you call a stored function in the constraint of a table ?
No.

What are the various types of parameter modes in a procedure ?
IN, OUT AND INOUT.

What is Over Loading and what are its restrictions ?
OverLoading means an object performing different functions depending upon the no. of parameters or the data type of the parameters passed to it.

Can functions be overloaded ?
Yes.

Can 2 functions have same name & input parameters but differ only by return datatype ?
No.

What are the constructs of a procedure, function or a package ?
The constructs of a procedure, function or a package are :
variables and constants
cursors
exceptions

Why Create or Replace and not Drop and recreate procedures ?
So that Grants are not dropped.

Can you pass parameters in packages ? How ?
Yes. You can pass parameters to procedures or functions in a package.

No comments:

Post a Comment

Thanks to given comments.......

My Blog List