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 / vijay kumar s

Hi all,

leave th 9th answer ............

ignore 9 th answer....

see below one

create table T_CHK (a number check (A < 99))


CREATE TRIGGER CHKT BEFORE INSERT ON T_CHK
FOR EACH ROW
BEGIN
IF :NEW.A >100 THEN
RAISE_APPLICATION_ERROR(-20011,'VALUES SHOULD BE < 100');
END IF;
END;


SQL> INSERT INTO T_CHK VALUES(101);
INSERT INTO T_CHK VALUES(101)
*
ERROR at line 1:
ORA-20011: VALUES SHOULD BE < 100
ORA-06512: at "SVR.CHKT", line 3
ORA-04088: error during execution of trigger 'SVR.CHKT'




Trigger will fire Before insert trigger only
then constraints
then after insert trigger

Is This Answer Correct ?    12 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the features of pl sql?

1063


What is secondary key?

932


i have some prob lem to tell me about my self in interview first round ...

2158


How to find 3rd highest salary of an employee from the employee table in sql?

1079


Are stored procedures faster than dynamic sql?

1029


How to change the order of columns in Oracle SQL Plus ?

1054


How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000

2165


What are the types of sql commands?

1096


what is collation? : Sql dba

1146


What are the different types of tables in sql?

1004


is it possible to pass an object or table to a procedure as an argument?

1129


Can we write ddl statements in functions?

1111


explain what is mysql? : Sql dba

1078


Why is partition used in sql?

1121


What is a recursive join sql?

1065