we can return only one value at a time. if we want more then one value we directly assign that value to the variable(ii) Types of triggers(*) row level trigger(*) statement level trigger(*) Before Trigger(*) After Trigger
we return one more than one value by using ref cursors.
Antony Gubert
Mar 20th, 2006
The following are some of the new features of oracle 9i....
1. Flash Back Query
2. Function based indexes
3. Materialized view enhancement etc....
harikishan
Mar 24th, 2006
1)Use Ref cursor to retuen more than one value. 2)Till oracle 8i there are 13 types of Database triggers. For 3 DML operations (ADD,DEL,MOD) before and after triggers Ex Before delete, After delete, Before update after update etc that'll make 6 triggers. For each 6 row level and statemnet level that'll make 12 types of triggers. 1 instead of triggers. to manipulate complex views . from 9i onwards new triggers have been introduced to logon and log off.3) There are 400 new features in oracle 9i. but mostly they are into DW concepts. and for developers point of view. Merge, Flashback query, New features in DB triggers, aditional features in Row id etc. Hope this wil helpHarikishan
If you want to return more than 1 value & dont want to use ref curser...try this, 1. Return comma separated varchar & then use dbms_utility.comma_to_table function to parse them.2. Try returning variable of type pl/sql table or varray.I have not tried number 2, but should work.
Krishna Mohan
May 12th, 2006
1. By default a function would return only one value.
2. For returning multiple values declare a ref cursor in package spec and use the same in the function/procedure in the package body.
3. Declare multiple variables as out parameters in the function/procedure being used . This will also return multple values.
rupak
May 24th, 2006
HI Shekhar,
can you please give me some example that how to return multiple values from a function using a comma separated varchar and parse it. I'm stuck in that situation and found solution using varry type. If getting the comma separated varchar would be better.
Thanks & regards
Rupak
Rajeshwaran
Jun 3rd, 2006
More than one values can be returned to the calling environment by a function is achieved by declaring INOUT parameters or OUT parameters in the function .
but it is not good programming practise to force a function to return more than one values...
Samir Narielwala
Jul 30th, 2007
Hi K.Mohan,
Can you provide a simple code showing how ref cursor can be used to return more than one values from the function? It would be very helpful.
Functions always returns One value. If you want to return more than One value, You can use the Out parameter. Using out parameter you can get more than one value, but you cannot use that function in Select Query.
The function always return a SINGLE value, which includes arrays. Check out the table functions (pipelined), BULK_COLLECT, arrays etc... You can find plenty of examples.
1) Data Definition Language triggers: These triggers fire when you make changes to the objects in the database like create, update or delete. They can be implemented to monitor the changes in the schema.
2) Data Manipulation Language Triggers:
3) Compound Triggers:
4) Instead-Of Triggers:
5) System or Database Event Triggers:
kishore
Jul 11th, 2013
By using pipe-lined concept we can return more than one value in function
hitesh
Jul 29th, 2013
before , after, intead of
anjan
Jul 31st, 2013
if u create a object , and use this type to return type, then you return multiple value.
neelu
Dec 1st, 2014
Statement level trigger, Row level trigger
anitha
Feb 26th, 2015
we can return multiple values by using return statement and out, inout.
shyam
Mar 2nd, 2015
Yes, we return more than one value in function using package.
Example::
Code
create package pack
is
type mul_val is record
(emp_id employees.employee_id%type,
emp_name employees.last_name%type);
end pack;
and the return type of function is that pack type.....
How to return more than one value from a function?What are the types of triggers?What are the features of oracle 9i
Questions by aseemnaithani answers by aseemnaithani
Related Answered Questions
Related Open Questions