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 are inbuilt functions in sql?

786


What is mutating error in pl sql?

742


How do you delete a table?

754


What company owns postgresql?

764


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

991






what are rollup and cube in t-sql? : Transact sql

812


What are the two types of periodical indexes?

654


What is the use of desc in sql?

692


Does sap use sql?

711


What is $$ in sql?

724


What is bind variable in pl sql?

716


What is a unique key?

769


what is denormalization. : Sql dba

759


What are the types of queries in sql?

733


What are sql functions? Describe the different types of sql functions?

747