Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    164

    Unanswered: Find the Datatypes that where used to create a temp table

    Is there a way to find out what the datatypes of a temp table are?

    Example:

    select cust_code, cust_name, cust_state
    into #customers
    where cust_state = 'TX'


    I would like to know what datatypes SQL used when creating #customers.

    Thank you for all the help.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    SELECT *
       INTO #foo
       FROM dbo.sysobjects
    
    EXECUTE tempdb..sp_help '#foo'
    -PatP

  3. #3
    Join Date
    Jan 2004
    Posts
    164
    Wonderful. Thank you very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •