Triggers(dbms)

sample1:

sql>ed trg1.sql

…………………………………………………..

create trigger trig1 after insert on sailors

begin

insert into boats values(’21’,’dustin’,’red’);  //see hint 2 ,hint 3

dbms_output.put_line(‘Value inserted into boat table’); //see hint 1

end;

…………………………………………

sql>@trg1.sql

………………………………………….

hint 1::be careful in put_line use only single quotes to print text.

hint 2 :: see that every insert or update command ends with a semi colon( ; )

hint 3 :: Be careful with inserting value, some values need single quotes.

…………………………………………………..

Sample 2

|-)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s