The Oracle/PLSQL ROWNUM function returns a number that represents the order that a row is selected by Oracle from a table or joined tables.
Example
select * from all_objects where rownum < 2
Oracle Tutorial, We have covered all Oracle articles which includes Oracle Database, Application, Framework, Oracle HRM, ADF Training and Financial Training. Further more we have queries and scripts for Oracle EBS Modules.
Showing posts with label Table Type. Show all posts
Showing posts with label Table Type. Show all posts
Saturday, 18 April 2020
Thursday, 2 January 2020
index Table Type in PLSQL
DECLARE
TYPE TABLENAMETYPE IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
L_TABLENAMETYPE TABLENAMETYPE;
BEGIN
--YOU CAN USE THIS L_TABLENAMETYPE TYPE HERE
L_TABLENAMETYPE(1) := 'AB';
L_TABLENAMETYPE(2) := 'ABC';
L_TABLENAMETYPE(3) := 'ABD';
L_TABLENAMETYPE(4) := 'ABE';
FOR LDX IN 1 .. L_TABLENAMETYPE.COUNT
LOOP
DBMS_OUTPUT.PUT_LINE(L_TABLENAMETYPE(LDX));
END LOOP;
---DELETE ALL VALUES
L_TABLENAMETYPE.DELETE;
END;
--RESULT
AB
ABC
ABD
ABE
---USE TABLE TYPE WITH BULK COLLECT INTO
DECLARE
CURSOR C IS
SELECT * FROM EMP;
TYPE ANY_TABLE_TYPE IS TABLE OF EMP%ROWTYPE INDEX BY BINARY_INTEGER;
EMP_REC ANY_TABLE_TYPE;
BEGIN
OPEN C;
FETCH C BULK COLLECT
INTO EMP_REC;
CLOSE C;
FORALL I IN EMP_REC.FIRST .. EMP_REC.LAST
UPDATE EMP
SET COMM = EMP_REC(I).SAL * 10 / 100
WHERE EMPNO =
EMP_REC(I).EMPNO;
COMMIT;
END;
Subscribe to:
Posts (Atom)
OADBTransactionImpl in Oracle Application Framework (OAF)
OADBTransactionImpl is a class in Oracle Application Framework (OAF), which is a framework for building Oracle E-Business Suite applications...
-
Create Type Loop_Type is table of Varchar2(400) Create or Replace Function Find_Loop_F (P_End_loop in NUmber Default 10) Return Loop_Typ...
-
//import oracle.cabo.ui.validate.Formatter; important Class for Formatting // Set Number fields Format public void se...
-
FND_PROFILE values: fnd_profile.value('PROFILEOPTION'); fnd_profile.value'MFG_ORGANIZATION_ID'); fnd_profile.value(...