hi all
how can I Declare Variable As Table Like Cursor
DECLARE parameter_cursor CURSOR FOR
SELECT top 1 c.name, t.name
FROM sysobjects o
JOIN syscolumns c on c.id = o.id
JOIN systypes t on c.xtype = t.xtype
WHERE o.name like 'Test'
order by o.name, c.colid
TanksYou cannot declare a table variable like a cursor, however you can declare a
table variable and then insert the data into the table variable. It will be
available for all the operations within the given scope.
Anith
Showing posts with label sysobjects. Show all posts
Showing posts with label sysobjects. Show all posts
Sunday, March 11, 2012
Declare Variable As Table
Labels:
allhow,
cursor,
cursordeclare,
database,
declare,
forselect,
microsoft,
mysql,
namefrom,
ojoin,
oracle,
parameter_cursor,
server,
sql,
syscolumns,
sysobjects,
table,
variable
Subscribe to:
Posts (Atom)