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 are all types of user defined functions?
If i insert record in table A and these record should update in table B by using Trigger.How to achieve this.
How to call DDL statements from pl/sql?
What are the advantages of normalization?
What are the differences between in and exists clause?
HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)
Where the sql database files are stored?
what is unique key constraint? : Sql dba
In a table i have columns A,B,C and i have a composite index on columns A,B if so will the following query uses index or not? SELECT sal,name FROM <table_name> WHERE A=<value> AND B=<value> AND C=<value>;
What is data type in sql?
How does join work in sql?
What is the difference between a primary key and a unique key?