How can I get temp table meta data as I need to know column names and types. select * from tempdb.sys.syscolumns where tname like '#task' is not working, however #task table is there
asked 10 Aug '12, 10:18
Are you using SQL Anywhere at all? AFAIK, the particular "tempdb" database is a particular ASE/MS SQL Server facility to store temporary tables.
SQL Anywhere (SA) has no explicit "tempdb" database, nor does it use the three-part-name schema (database.owner.table). So it seems the
select from tempdb.sys.syscolumns
completely ignores the "database" specifier and is really just a
select from sys.syscolumns
and simply returns alls rows for all permanent tables and for all global temporary tables.
So, if you're using SA, then "#task" will only be in the result set if it is a global temporary table.
FWIW, SA's "temp" dbspace is something completely different...
answered 10 Aug '12, 11:18