Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    16

    Unanswered: How to declare user defince data type column in temporary table variable

    Is it possible to declare a column of user defined datatype in Temporary table variable if yes please provide the syntax

    Another query is about how to declare Temp table column datatype like the original table column datatype.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Code:
    CREATE TYPE my_type FROM char(6)
    GO
    
    DECLARE @table table (
       col my_type
    )
    
    
    GO
    DROP TYPE my_type
    George
    Home | Blog

Posting Permissions

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