how table is defined in plsql table? how can i select
column from plsql table?
can i use select * from plsql table type?
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 |
What happens to indexes if you drop a table?
What is the order of defining local variables and sub procedures/functions?
can you write commit in triggers?
does the query needs a hint to access a materialized view?
What is null value in oracle?
What is meant by recursive hints in oracle?
which clause we are not used in where clause?
What is using clause and give example?
How to increment dates by 1 in oracle?
How to Select second Maximum salary in a Table ?
how will I find the first 5 highest salaried employees in each dept in oracle.
I have a table called 'test' on source and target with same name, structure and data type but in a different column order. How can you setup replication for this table?