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
What is the difference between syntax error and runtime error?
What are the commands used in sql?
Is sql harder than python?
write an sql query to find names of employee start with 'a'? : Sql dba
list out some tools through which we can draw e-r diagrams for mysql. : Sql dba
What is primary key sql?
How many aggregate functions are available there in sql?
tell me about various levels of constraint. : Sql dba
how to use case expression? : Sql dba
How do I filter in sql profiler?
What do you mean by stored procedures?
What is difference between inner join and self join?
what is the syntax for using sql_variant_property? : Transact sql
What is trigger with example?
What is materialized view. What are different methods of refresh?