what is the diff between cursor and plsql table
5 pts.
0
Q:
what is the diff between cursor and plsql table
what is the diff between cursor and plsql table
ASKED: Aug 7 2008  3:34 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
7010 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Cursor expressions (sometimes known as cursor subqueries) are an element of the SQL language (earlier) and now of the PL/SQL too. A cursor expression can be used as an actual parameter to a PL/SQL procedure or function, which has great significance in connection with table. It can also be used functions in the SELECT statement used to open a PL/SQL cursor, and manipulated appropriately as per the requirement. Cursor expressions allow encapsulation of logic for re-use in compatible query situations, giving increased developer productivity and application reliability. A table function with a ref cursor input parameter can be invoked with another table function as the data source. Thus table functions can be daisy-chained allowing modular program design and hence increased ease of programming, re-use and application robustness. Both cursor and PL/SQL table can be used to store temporary data for manipulation. You don't "store" data in a cursor, the data comes from a table or global temporary table. you store data in a table. Global Temporary Tables are ideal for this. A correct name for a PL/SQL table would be PL/SQL array (earlier it was used as table). A cursor variable (i.e. a variable of type ref cursor) points to an actual cursor, and may be used as a formal parameter to a PL/SQL procedure or function or array. So in nutshell a Cursor is not a data type to store some data; it is either declared with the FOR clause that will bind it to a SELECT statement or it will act as an alias for another cursor, with the SET statement. A Table data type is an alternative way to create a temporary table. The variable declaration requires the column definition for the table and it creates a temporary table in tempdb.
Last Answered: Aug 7 2008  5:25 AM GMT by Jaideepkhanduja   7010 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0