how table is defined in plsql table? how can i select
column from plsql table?
can i use select * from plsql table type?
Answer Posted / abapdeveloper09
1. Define a TABLE data type
TYPE type_name IS TABLE OF
(column_type | variable%TYPE
| table.column%TYPE | table%ROWTYPE
INDEX BY BINARY_INTEGER);
2 Declare a variable of that type
identifier type_name;
Assume the PLsql table (emp_table_type) has emp's first
name and index columns and you want to display this column
data (Emp's first name)
TYPE type_name IS TABLE OF
employee.firstname%TYPE
INDEX BY BINARY_INTEGER;
emp_table_type type_name;
Load data into emp_table_type table
-- Display emp's first name data
FOR index in EMP_table_type.FIRST..EMP_table_type.LAST
LOOP
DBMS_OUTPUT.PUT_LINE(EMP_table_type(index));
END LOOP;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
HI, Please let me know the syllabus for Oracle OCA and OCP Certification
Explain table?
Explain oracle data types with examples?
What is meant by a deadlock situation?
what is reindexing?
How to check database size in Oracle?
Explain the use of log option in exp command.
what is the difference between substr and instr function in oracle?
Explain the use of grant option in exp command.
can u send the sql dumps to sivakumarr1987@gmail.com plz help me
What is an oracle table?
What view(s) do you use to associate a users SQLPLUS session with his o/s process?
Explain the use of analyse option in exp command.
How to create a new table in oracle?
Give the different types of rollback segments.