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
Can we perform dml on view?
Do we need to rebuild index after truncate?
What is sql profiling in oracle?
what is union, minus and interact commands? : Sql dba
How does left join work in sql?
What is use of package in pl sql?
how to create a table index in mysql? : Sql dba
what is column? : Sql dba
How do you get column names only for a table (sql server)?
Why we use join in sql?
How many joins in sql?
how do you know if your mysql server is alive? : Sql dba
how many values can the set function of mysql take? : Sql dba
Define concurrency control. : Transact sql
what happens if null values are involved in expressions? : Sql dba