Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql select data type of query

SELECT x.* INTO TMP1
FROM ( SELECT TOP 1 /* rest of your query expression here */ ) as x;

SELECT o.name AS obj_name, TYPE_NAME(c.user_type_id) AS type_name, c.*  
FROM sys.objects AS o   
JOIN sys.columns AS c  ON o.object_id = c.object_id  
WHERE o.name = 'TMP1';

DROP TABLE TMP1;
 
PREVIOUS NEXT
Tagged: #sql #select #data #type #query
ADD COMMENT
Topic
Name
3+8 =