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

Why is nosql good?

595


What are the query optimization techniques?

535


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

809


What is your daily office routine?

1810


How to avoid duplicate records in a query?

578






What is offset and limit in sql?

552


What does <> sql mean?

542


Differentiate pl/sql and sql?

563


What is embedded sql what are its advantages?

507


Can we perform dml on view?

555


What is the difference between between and in condition operators?

534


what is the difference difference between procedure and packages

9222


How can I make sql query run faster?

559


What is sql*plus?

568


Can we alter stored procedure?

544