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 |
how to delete duplicate rows from a specified table(only single table) how do you know which join is need to be used
What is difference between cursor and trigger?
What is an alias command?
Differentiate between pl/sql and sql?
Are null values same as that of zero or a blank space?
How can I create a table from another table without copying any values from the old table?
What is number function in sql?
What is coalesce sql?
What are nested triggers ?
6 Answers Amazon, Appeal Soft, IBM, Infosys, TCS,
what is the difference between sql and t-sql? : Transact sql
Which join condition can be specified using on clause?
If there are 1 to 100 numbers in a table and in that 100 numbers some 10 numbers are deleted.I want to find out the missing numbers between 1 to 100 by pl/sql how?