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

What is the difference between syntax error and runtime error?

1138


What are the commands used in sql?

1077


Is sql harder than python?

1098


write an sql query to find names of employee start with 'a'? : Sql dba

1024


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

965


What is primary key sql?

1032


How many aggregate functions are available there in sql?

980


tell me about various levels of constraint. : Sql dba

1033


how to use case expression? : Sql dba

1021


How do I filter in sql profiler?

990


What do you mean by stored procedures?

1011


What is difference between inner join and self join?

1079


what is the syntax for using sql_variant_property? : Transact sql

1038


What is trigger with example?

1092


What is materialized view. What are different methods of refresh?

1388