can we delete the trigger in a view? if yes why if not why?

Answers were Sorted based on User's Feedback



can we delete the trigger in a view? if yes why if not why?..

Answer / pradeep

As per my knowledge we can drop trigger crated on view see
below exp

CREATE OR REPLACE FORCE VIEW "SCOTT"."TEST_VIEW"
("EMPNO", "ENAME", "JOB", "MGR", "HIREDATE", "SAL", "COMM",
"DEPTNO") AS
select "EMPNO", "ENAME", "JOB", "MGR", "HIREDATE", "SAL", "
COMM", "DEPTNO" from emp;

SQL> create or replace
2 TRIGGER SCOTT.VIEW_TIG
3 INSTEAD OF INSERT OR DELETE OR UPDATE ON TEST_VIEW
4 BEGIN
5 NULL;
6 END;
7 /

Trigger created.

SQL> drop trigger VIEW_TIG ;

Trigger dropped.

Is This Answer Correct ?    11 Yes 0 No

can we delete the trigger in a view? if yes why if not why?..

Answer / sam

no we cannot delete trigger on a view.

Is This Answer Correct ?    12 Yes 7 No

can we delete the trigger in a view? if yes why if not why?..

Answer / kishore

create or replace
TRIGGER VIEW_TIG
INSTEAD OF INSERT OR DELETE OR UPDATE ON TEST_VIEW
BEGIN
NULL
END

1 create or replace
2 TRIGGER VIEW_TIG
3 INSTEAD OF INSERT OR DELETE OR UPDATE ON TEST_VIEW
4 BEGIN
5 NULL;
6* END;
SQL> /

Trigger created.

SQL> DROP TRIGGER VIEW_TIG;

Trigger dropped.

Is This Answer Correct ?    2 Yes 0 No

can we delete the trigger in a view? if yes why if not why?..

Answer / deep

YES OFFCOURSE ... WE CAN DELETE THE TRIGGER VIEW AS USING DROP COMMAND. IN ORDER TO DROP ANY TRIGGER



DROP TRIGGER TRIGGER_NAME;

TIGGER DROPPED.....

Is This Answer Correct ?    1 Yes 0 No

can we delete the trigger in a view? if yes why if not why?..

Answer / shashi bhusan

No

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

find the third highest salary?

23 Answers  


what is row? : Sql dba

0 Answers  


When do we create bitmap indexes

2 Answers   CTS,


Why join is faster than subquery?

0 Answers  


what are all different types of collation sensitivity? : Sql dba

0 Answers  


Is inner join same as self join?

0 Answers  


what is view? : Sql dba

0 Answers  


What is coalesce sql?

0 Answers  


what is ref cursor in pl/sql?

3 Answers  


Why do we need unique key in a table?

0 Answers  


If I have a table T with 4 rows & 2 columns A & B. A has values 1,2,3,4. and B has 10,20,30,40. Write an Update SQL query which can Swap the values of A & B for all records. (Do not use a sub-query)

5 Answers  


What is difference between stored procedure and trigger?

0 Answers  


Categories