I create a global temp table (i.e ##TheTable
) using C# code. I want to be able to see that temp table in SQL server management studio after the code runs completely.
Is it possible to do this ? If yes, then how ?
SELECT '#TempTable Exists'; This method takes into account the scoped temporary table, and gets its object_id from tempdb. If it exists, you will get a non-null value. A null value means that it doesn't exist.
Temporary tables are stored in tempdb Database.
To retrieve the list of columns available, you can use the below scripts. SELECT QUOTENAME([name]) + ',' as ColumnName, TYPE_NAME(user_type_id) as DataTypeName, * FROM tempdb. sys. columns WHERE OBJECT_ID = OBJECT_ID('tempdb..
All temp tables are logged under SQL server > Databases > System Databases > tempdb -> Temporary Tables
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With