Thursday, April 21, 2016

Thursday, April 7, 2016

Trigger Example

We illustrate Oracle's syntax for creating a trigger through an example based on the following two tables:

CREATE TABLE T4 (a INTEGER, b CHAR(10));

CREATE TABLE T5 (c CHAR(10), d INTEGER);

We create a trigger that may insert a tuple into T5 when a tuple is inserted into T4. Specifically, the trigger checks whether the new tuple has a first component 10 or less, and if so inserts the reverse tuple into T5:

CREATE TRIGGER trig1
    AFTER INSERT ON T4
    REFERENCING NEW AS newRow
    FOR EACH ROW
    WHEN (newRow.a <= 10)
    BEGIN
        INSERT INTO T5 VALUES(:newRow.b, :newRow.a);
    END trig1;
.
run;


Notice that we end the CREATE TRIGGER statement with a dot and run, as for all PL/SQL statements in general. Running the CREATE TRIGGER statement only creates the trigger; it does not execute the trigger. Only a triggering event, such as an insertion into T4 in this example, causes the trigger to execute.

Thursday, February 25, 2016

Monday, February 15, 2016

DBMS Presentaions

Download from Here

Courtacy: McGraw Hill Education

Sunday, January 3, 2016

Dear T. E. Students, pl fill the academic mentoring form

Dear T. E. Students, the academic mentoring form is to be filled. The form is sent to your emails given by you in your registration.

Do fill it and also inform your friends about the same.

Best of luck for this semester!

Registration link for students of T. E. Computer Sem VI

Note: This registration is to be done ONLY after registration at CC!

Register Here