wtite down triggr not any entry on Sunday

Answers were Sorted based on User's Feedback



wtite down triggr not any entry on Sunday..

Answer / debasish sinha

create or replace trigger trg_sun
before insert on <table name>
begin
if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then
raise_application_error(-20345,'no transaction in sunday');
end if;
end trg_sun;

Is This Answer Correct ?    7 Yes 1 No

wtite down triggr not any entry on Sunday..

Answer / rajdeep

create or replace trigger <trigger_name> before insert on <table_name>
begin
if (sysdate,'day') in 'sunday'
then
raise_application_error(-20500,'cannot insert values on sunday');
end if;
end;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what is commit? : Sql dba

0 Answers  


Can we use threading in pl/sql?

0 Answers  


What is diff between bulk collect and forall

3 Answers   Metric Stream,


what is cross join? : Sql dba

0 Answers  


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

0 Answers  






How do I make sql search faster?

0 Answers  


What is data abstraction in sql?

0 Answers  


What is the cause of mutating table error and how can we solve it?

0 Answers  


What is Difference between StoredProcedure and function?

3 Answers  


What does the hierarchical profiler does?

0 Answers  


HP Interview -2016 Unix 1) grep command in unix 2) what is set command

1 Answers   HCL,


What is TABLE SPACE?

4 Answers   ABB, TCS,


Categories