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 |
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
What is ttitle and btitle?
What are sql functions? Describe the different types of sql functions?
What are sql ddl commands?
How do you explain an index number?
What is the difference between sql and t sql?
What is normalization in a database?
What is the difference between delete, truncate and drop command?
Define join and name different types of joins?
Is t sql a programming language?
how to rename an existing table in mysql? : Sql dba
What are different types of sql commands?
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)