wtite down triggr not any entry on Sunday
Answers were Sorted based on User's Feedback
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 |
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 |
what is commit? : Sql dba
Can we use threading in pl/sql?
What is diff between bulk collect and forall
what is cross join? : Sql dba
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
How do I make sql search faster?
What is data abstraction in sql?
What is the cause of mutating table error and how can we solve it?
What is Difference between StoredProcedure and function?
What does the hierarchical profiler does?
HP Interview -2016 Unix 1) grep command in unix 2) what is set command
What is TABLE SPACE?