If i insert record in table A and these record should update in table B by using Trigger.How to achieve this.

Answer Posted / shwetha

CREATE TABLE A1(ID NUMBER(2),NAMES VARCHAR2(30))

CREATE TABLE B1(ID NUMBER(2),NAMES VARCHAR2(30),STATUS VARCHAR2(10))

CREATE OR REPLACE TRIGGER A1B1
AFTER INSERT ON A1
FOR EACH ROW
BEGIN
INSERT INTO B1 VALUES(:NEW.ID, :NEW.NAMES,'Y');
END;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sap sql anywhere?

525


What is difference between db2 and sql?

523


How do I get sql certification?

519


What is fmtonly in sql?

522


what are the non-standard sql commands supported by 'mysql'? : Sql dba

569






What are the types of dbms?

541


How do I enable sql encryption?

516


what is the functionality of the function htmlentities? : Sql dba

515


Which join is like an inner join?

519


Which is faster count (*) or count 1?

532


What are basic techniques of indexing?

838


What are the main features of cursor?

617


Why do we use subquery?

479


what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba

519


What is the full form of sql?

532