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

With out using count() function. How to the find total number of rows in a table?

6 Answers  


What is cascade in sql?

0 Answers  


why should required nested tables, Object types, partition tables and varying arrays. what is the difference between these are all. give me example with explanation.

2 Answers  


What is the difference between UNIQUE CONSTRAINT and PRIMARY KEY? 1. There is no difference. 2. A PRIMARY KEY cannot be declared on multiple columns. 3. A UNIQUE CONSTRAINT cannot be declared on multiple columns. 4. A table can have multiple PRIMARY KEYS but only one UNIQUE CONSTRAINT. 5. A table can have multiple UNIQUE CONSTRAINTs but only one PRIMARY KEY.

7 Answers   Satyam,


What is an intersect?

0 Answers  






Is inner join faster than left join?

0 Answers  


HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)

8 Answers   BeBo Technologies,


What is snowflake sql?

0 Answers  


How do you use join?

0 Answers  


What are the different dml commands in sql?

0 Answers  


HP Interview -2016 Unix 1) grep command in unix 2) what is set command

1 Answers   HCL,


what are the advantages of using stored procedures? : Sql dba

0 Answers  


Categories