Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do SPs have anything like Oracle's rowtype for cursors?

Status
Not open for further replies.

chelandrew

IS-IT--Management
Oct 8, 2001
25
US
SqlServer 2000. Is there a method to declare a variable of the name and datatype of each column in a cursor, like %rowtype or %type in Oracle? Can table variables be mapped automatically to cursors?
 
According to SQL Server Books Online

Transact-SQL does not support the %TYPE and %ROWTYPE variable data type definitions. A Transact-SQL variable cannot be initialized in the DECLARE statement. The NOT NULL and CONSTANT keywords cannot be used.

Like Oracle LONG and LONG RAW data types, text and image data types cannot be used for variable declarations. Additionally, the PL/SQL style record and table definitions are not supported.


Chalk up another point for Oracle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top