Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the various types of snapshots ?

985


What is the difference between post-database commit and post-form commit?

1120


How are extents allocated to a segment?

1078


What is not equal to in oracle?

959


Explain the blob datatype?

1027


How to retrieve data from an cursor to a record?

1030


Can a parameter be passed to a cursor?

1059


What are the differences between lov and list item?

1005


What does sharding mean?

954


What is sharded cluster?

934


What is bulk load in oracle?

1015


How to define a cusotmer as a supplier in ORACLE R12

2186


How does oracle handle read consistency?

1057


What are the set operators union, union all, minus & intersect meant to do?

944


What operating systems are supported by oracle database 10g xe?

991