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 the difference between delete and truncate statement in sql?

0 Answers  


Explain aggregate functions are available there in sql?

0 Answers  


What are the different types of database management systems?

0 Answers  


Why do we use partitions in sql?

0 Answers  


What is break?

0 Answers  






What is PL/SQL Records?

0 Answers  


Can procedure in a package be overloaded?

1 Answers   HCL,


What is meant by Join? What are the different types of Joins available? Explain.

5 Answers   Cap Gemini,


define sql delete statement ? : Sql dba

0 Answers  


What is insert command in sql?

0 Answers  


----> There is a table T with two columns C1 and C2. The data is as below: C1 C2 1 4 2 5 3 6

4 Answers   ICICI,


What do you mean by rowid?

0 Answers  


Categories