can a table has a column that has only view data and in
other columns we can change data?
Answers were Sorted based on User's Feedback
Answer / thiru
Yes. We can build a sequence generator value to a column in
a table then next columns can be handled with SQL queries.
| Is This Answer Correct ? | 1 Yes | 2 No |
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 |
How many categories of data types?
what is the difference between restoring and recovering?
18. Display the clientno and total value for all orders placed by that client. Output the result in the following format: Client <clientno> has placed orders to the value of <total value>
How would you best determine why your MVIEW couldnt FAST REFRESH?
What is the use of aggregate functions in oracle?
Suppose U install the oracle DB either enterprise edition or express edition in ur personal PC, Is there the Database has been created after ur installation if not then where the oracle's all objects with data be stored?
What is set verify off in oracle?
Hi Can any one tell me what are the API's used in requisition import.
WHAT IS THE DEFINITION OF DEFAULT CUSTOMER IN AR?
Why does Oracle not permit the use of PCTUSED with indexes?
How to execute a stored procedure in oracle?
How to use an explicit cursor without open statements?