brokeMyLegBiking
asked on
list tables in tempdb
How can I list the tables in the tempdb?
This doesn't work:
select * from tempdb.systables
and this doesn't work:
object_id('#ztemp_fundingD ynamic')
This doesn't work:
select * from tempdb.systables
and this doesn't work:
object_id('#ztemp_fundingD
exec sp_tables
Use Tempdb
exec sp_tables
exec sp_tables
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you want to list *all* tables or just your own?
If you want to list all, you can do this:
SELECT name
FROM tempdb.dbo.sysobjects WITH (NOLOCK)
WHERE xtype = 'U'
If you want to list all, you can do this:
SELECT name
FROM tempdb.dbo.sysobjects WITH (NOLOCK)
WHERE xtype = 'U'