what are Triggers?

Answers were Sorted based on User's Feedback



what are Triggers?..

Answer / kaarthi v

Triggers are the database objects (Like Procedures) which
will be executed by the Database itself and cannot be
excuted by the user explicitly. The trigger can be written
to execute while inserting/ updating/ deleting a row.

Two types of triiger

ROW LEVEL TRIGGER
===============
Row Level triggers are FOR EACH ROW, that is, the trigger
is activated for each row that is inserted/updated/deleted.

STATEMENT LEVEL TRIGGER
=====================
Statement level triggers will execute the action specified
only once. (Will not consider the no. of rows being
inserted/updated/deleted)

Is This Answer Correct ?    13 Yes 0 No

what are Triggers?..

Answer / akn

Triggers are basically used to implement business rules.
Triggers are also similar to stored procedures.The
difference is that it can be activated when data is added
or edited or deleted from a table in a database.

Is This Answer Correct ?    2 Yes 1 No

what are Triggers?..

Answer / jamuna

triggeres are databbase objects this are stored inthe
data base same as the procedures but procedures executed
explicitely byt triggers executed implicitely when
trigger event occures
triggere event means DML OPERATIONES (INSERT,UPDATE,DELETE)

Is This Answer Correct ?    0 Yes 0 No

what are Triggers?..

Answer / sreekanth

Can anyone tell me in which scenarios row and statement lever can be used?

Is This Answer Correct ?    0 Yes 0 No

what are Triggers?..

Answer / rocky-455

Triggers are validating data from COLUMNS/TABLE. It handles complex validations.

Is This Answer Correct ?    0 Yes 0 No

what are Triggers?..

Answer / kamala k n

triggers types two row and statement

Is This Answer Correct ?    0 Yes 0 No

what are Triggers?..

Answer / suresh

SQL> CREATE TABLE to_table
2 (col1 NUMBER);

Table created.

SQL> CREATE OR REPLACE TRIGGER statement_trigger
2 AFTER INSERT ON to_table
3 BEGIN
4 DBMS_OUTPUT.PUT_LINE('After Insert Statement
Level');
5 END;
6 /

Trigger created.

SQL> CREATE OR REPLACE TRIGGER row_trigger
2 AFTER INSERT ON to_table
3 FOR EACH ROW
4 BEGIN
5 DBMS_OUTPUT.PUT_LINE('After Insert Row Level');
6 END;
7 /

Trigger created.


SQL> INSERT INTO TO_TABLE VALUES(1);
After Insert Row Level
After Insert Statement Level

1 row created.


SQL> BEGIN
2 INSERT INTO TO_TABLE VALUES(2);
3 INSERT INTO TO_TABLE VALUES(3);
4 INSERT INTO TO_TABLE VALUES(4);
5 INSERT INTO TO_TABLE VALUES(5);
6 INSERT INTO TO_TABLE VALUES(6);
7 INSERT INTO TO_TABLE VALUES(7);
8 INSERT INTO TO_TABLE VALUES(8);
9 INSERT INTO TO_TABLE VALUES(9);
10 INSERT INTO TO_TABLE VALUES(0);
11 END;
12 /

WAT LL BE THE O/P???

XPLAIN IT>>>>

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Oracle General Interview Questions

1. Display all the rows and columns in the CLIENT table. Sort by client name in reverse alphabetical order.

2 Answers   Wipro,


What is data type in oracle?

0 Answers  


What is where clause in oracle?

0 Answers  


What is oracle latest version?

0 Answers  


can a table has a column that has only view data and in other columns we can change data?

2 Answers   Secon,






What is SYSTEM tablespace and When is it Created?

2 Answers  


which clause we are not used in where clause?

3 Answers   Semantic Space,


Maximum how many triggers can be updated in table ?

5 Answers   Accenture, Cap Gemini,


How to create a new oracle data file?

0 Answers  


How to store pictures on to the database?

0 Answers  


How many types of auditing in Oracle?

0 Answers   MCN Solutions,


> CREATE OR REPLACE FUNCTION FACTORIAL_1(factstr varchar2 ) 2 RETURN NUMBER AS 3 new_str VARCHAR2(4000) := factstr||'*' ; 4 fact number := 1 ; 5 BEGIN 6 7 WHILE new_str IS NOT NULL 8 LOOP 9 fact := fact * TO_NUMBER(SUBSTR(new_str,1,INSTR(new_str,'*')-1)); 10 new_str := substr( new_str,INSTR(new_str,'*')+1); 11 END LOOP; 12 13 RETURN fact; 14 15 END; explanation Above program?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1790)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)