Home » Other » Training & Certification » Create trigger
Create trigger [message #281573] Sun, 18 November 2007 07:49 Go to next message
malli.sql
Messages: 1
Registered: October 2007
Location: Pune
Junior Member
Hi ALL,

I have assigned the task given below.please guide me in approaching the solution.Help will be highly appreciated.

Thanks& Regards
XYZ


Step1:
Create a table emp1 with columns eid datatype number,ename datatype charecter constraints primary key on eid.

Step2:
Create sequence to generate the eid which start with 1000 and increase with 1

Step3:
Create procedure and insert the eid(get the value from sequence) and ename as a constant
e.g mallikarjun

Step4:
Create trigger (before insert) on emp1 table wich will call the another procedure(in Step:5)

Step5:
create procedure which is having in out parameter as type emp1.ename
display the ename before inserting
change the ename to mallikarjun kotturu
display the ename after insert.

The final data should be 1000 as eid and mallikarju kotturu as ename in the table.

Re: Create trigger [message #281576 is a reply to message #281573] Sun, 18 November 2007 08:28 Go to previous messageGo to next message
pablolee
Messages: 2836
Registered: May 2007
Location: Scotland
Senior Member
And what have you tried? Or do you expect us to do your homework for you?
Re: Create trigger [message #281578 is a reply to message #281573] Sun, 18 November 2007 08:31 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
PL/SQL User's Guide and Reference

SQL Reference

Regards
Michel
Previous Topic: DB CACHE
Next Topic: procedures
Goto Forum:
  


Current Time: Fri Dec 09 21:21:43 CST 2016

Total time taken to generate the page: 0.13999 seconds