wtite down triggr not any entry on Sunday

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I get the number of records affected by a stored procedure?

586


What steps server process has to take to execute an update statement?

516


What is the mutating table and constraining table?

567


Are pl sql variables case sensitive?

604


What is sql indexing?

565






What is insert command in sql?

532


What is the plv (pl/vision) package offers?

625


Why are aggregate functions called so?

526


what are sequences

1111


Why do we go for stored procedures?

531


Explain scalar functions in sql?

591


How does left join work in sql?

529


What are crud methods?

562


Which one is better subquery or joins?

568


What is indexing in sql and its types?

558