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 view explain with example?
Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints
What is a join query?
Why do we use procedures in sql?
How does a covering index work?
What is sql performance tuning?
Does view store data in sql?
Which join is default?
Explain the purpose of %type and %rowtype data types?
What is cascade in sql?
What is difference between hql and native sql?
What are inbuilt functions in sql?
Explain the uses of database trigger.
What is interval partition?
What is trigger in sql? Explain