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...

can a table has a column that has only view data and in
other columns we can change data?

Answer Posted / hari kanth

ya,we can create trigger on that table
like as follows
CREATE OR REPLACE TRIGGER key_gen
BEFORE INSERT ON <table_name>
FOR EACH ROW
DECLARE
v_num NUMBER(5);
BEGIN
SELECT seq.nextval INTO v_num from dual;
:new.id:=SAM||LPAD(v_num,3,0);
END;

the <table_name> structure like as follows
(id VARCHAR2(20),
name VARCHAR2(15)
)
now you can just add the records like as follows
INSERT INTO <table_name>
(
name
)
VALUES
(
'&Name'
);
then trigger will fires and automatically it will inserts
into that table with out our knowledge.

NOTE:here "seq" is forward sequence.if it start with 1 and
incremented by 1 then the output will be like as follows

select * from <table_name>

id name

SAM001 TV
SAM002 LCD

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is blob data type in oracle?

1041


How will you write a query to get a 5th rank student from a table student_report?

1812


What is oracle analytical function?

1027


You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?

1935


What are the advantages of oracle?

960


How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?

3152


Whether any commands are used for months calculation? If so, what are they?

1039


Database crashes. Corruption is found scattered among the file system neither of your doing nor of Oracles. What database recovery options are available? Database is in archive log mode.

1943


If any one has information regarding interview of NIC (National Informatics Centre),it would be of great help...

2179


What is a private synonym?

1524


What to do if the binary spfile is wrong for the default instance?

997


How many types of segments in Oracle?

1011


What do you know about normalization? Explain in detail?

879


How to define a cusotmer as a supplier in ORACLE R12

2164


WHAT IS THE DEFINITION OF DEFAULT CUSTOMER IN AR?

2145