Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

which will fire first ? Trigger or Constraint

Answer Posted / radha sri seshu.kolla

NOW I AM 100% SURE THAT TRIGGER WILL FIRE FIRST.
TRY THIS CODE YOU WILL UNDERSTAND

------------------------------------------------------------
CREATE OR REPLACE TRIGGER EMPTRIGGER BEFORE INSERT ON EMP
FOR EACH ROW
BEGIN
FOR I IN (SELECT EMPNO FROM EMP)
LOOP
IF I.EMPNO=:NEW.EMPNO THEN
RAISE_APPLICATION_ERROR(-20201,'INVALID NUMBER');
END IF;
END LOOP;
END;
/
INSERT INTO EMP(EMPNO,DEPTNO) VALUES(7788,10)
---------------------------------------------------------
FEEL FREE TO TALK WITH ME ON 9966409914. IF NOT RINGING
THEN TRY 9966112520

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain two easy sql optimizations.

959


What are the basic techniques of indexing?

1012


what is an alias command? : Sql dba

1006


How do you write a complex sql query?

1006


How do I trace sql profiler?

919


Explain normalization and what are the advantages of it?

890


what is the difference between truncate and delete statement? : Transact sql

1015


what are enums used for in mysql? : Sql dba

1108


What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

992


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1217


Write an sql query to select all records from the table?

967


Name some usages of database trigger?

965


What are few of the schema objects that are created using PL/SQL?

967


How can you tell the difference between an index and a view?

869


How do you write a subquery?

964