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 |
Why do we need databases?
Why do we use sqlite?
What is oracle sql called?
What are the two different parts of the pl/sql packages?
Does postgresql run on the cloud?
what is a constraint? Tell me about its various levels. : Sql dba
what is meant by tuning and tk proof?
Why function is used in sql?
How do I partition a table in sql?
How to run sql*plus commands in sql developer?
what are the tunnig tables you used for tuning a query and tell me some of coloumns in that tuning tables?
What is auto increment?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)