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
What is a sub query? What are its various types?
How to update values in a table in oracle?
What is meant by joins? List out the types of joins.
How to connect the oracle server as sysdba?
What is an Oracle index?
Which is better Oracle or MS SQL? Why?
How to create a stored function in oracle?
How to build data dictionary view an new database?
How to pass a cursor variable to a procedure?
State all possible different index configurations a table can possibly have?
How can I convert single byte kana characters into multi byte kana characters and vice-versa.
What is the difference between post-database commit and post-form commit?
How to write text literals in oracle?
Point out the difference between user tables and data dictionary?
What are operators in oracle?