Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can we perform dml on view?

1050


Do we need to rebuild index after truncate?

1037


What is sql profiling in oracle?

1068


what is union, minus and interact commands? : Sql dba

1190


How does left join work in sql?

1008


What is use of package in pl sql?

1018


how to create a table index in mysql? : Sql dba

1067


what is column? : Sql dba

1011


How do you get column names only for a table (sql server)?

1170


Why we use join in sql?

979


How many joins in sql?

1017


how do you know if your mysql server is alive? : Sql dba

1081


how many values can the set function of mysql take? : Sql dba

994


Define concurrency control. : Transact sql

1193


what happens if null values are involved in expressions? : Sql dba

1046