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 |
which will default fire first statement level trigger or row level trigger
2 Answers Cap Gemini, Data Vision,
Are sql database names case sensitive?
What kind of join is join?
How many postgresql users are there, worldwide?
Explain the difference between rename and alias?
Whis is not false in primary key?
What are sql indexes?
What is before and after trigger?
What is a sql schema used for?
What is not in sql?
what is a database lock ? : Sql dba
What are the steps you take to tune(performance tuning) the code in plsql?
4 Answers Cap Gemini, Infosys, TCS,
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)