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 procedure explain with example?

894


What is database sql?

982


How do you optimize a stored procedure in sql?

893


Can we join two tables without common column?

928


How to select all records from the table?

1067


Is join an inner join?

896


What is sql mysql pl sql oracle?

1026


What are different types of keys?

1015


What is the function that is used to transfer a pl/sql table log to a database table?

950


What is a primary key called that is made up of more than one field?

1282


What is online transaction processing (oltp)?

961


Why use truncate instead of delete?

959


What are sql procedures?

965


How do I know if I have sql express or standard?

976


Where is sql database stored?

919