• Stewart "Arturius" Campbell (3/13/2013)


    Interesting question, thanks Dave

    Another way to check the detail of the temp table would be to execute tempdb..sp_help #TempQoD

    I often use sp_help to get db object info, but never try the query on explanation. That query can be handy since it provides more info about a particular table. Thank Dave!

    Derived on the query on the explanation, this query can be used to object info for other db objects such as trigger and stored procedure.

    USE tempdb;

    go

    SELECT *

    FROM sys.objects o

    LEFT JOIN sys.columns AS c ON c.object_id = o.object_id

    LEFT JOIN sys.types AS t ON t.system_type_id = c.system_type_id

    WHERE o.object_id = object_id('#TempQoD');

    --------------------------------------------------------------------------------------
    Hai Ton
    My Db4Breakfast blog.