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 is a database table in oracle?

950


How view is different from a table?

966


How to use subqueries with the exists operator in oracle?

967


How to use "in" parameter properly?

1000


What is the meaning of recursive hints in oracle?

992


1) WIll all the user get the DEFAULT profile, if their current profile got deleted at any point of time? 2) What are the Situation we need to MOVE the TABLE between T.spaces? 3) What is the use of MOVING the TABLE between SCHEMA'S? 4) What are the Table Clause, Segment Clause and the Datafile Clause which will override each other? 5) Explain SORT_AREA_SIZE of Tempfile to make UNIFORM SIZE

1908


Can we write dml statement in function in oracle?

1021


Explain the difference between replace() and translate() functions in oracle?

973


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?

1045


Explain the use of consistent option in exp command.

971


How to select all columns of all rows from a table in oracle?

989


Difference between hot backup vs. Cold backup?

942


what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?

2218


Write a trigger example in oracle?

977


What is logical backup in oracle?

964