Search
 
SCRIPT & CODE EXAMPLE
 

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;
Comment

sql server select query datatype

 --Microsoft SQL Server 2019

 DECLARE @query nvarchar(max) = '
    SELECT TOP (1000) [id]
      ,[name]
      ,[lastname]
      ,[age]
      ,[createdate]
	  , cast(createdate as date) as data_date
  FROM [Z_Test].[dbo].[userDemo]
';
EXEC sp_describe_first_result_set @query, null, 0; 
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql check if entry exists 
Sql :: missing index on mssql rds database 
Sql :: IS THEre any difference between using default and := in plsql 
Sql :: split a database into related tables based on their structure in MySQL 
Sql :: SQL RIGHT JOIN With AS Alias 
Sql :: VHDL Example Code of Record Type 
Sql :: subconjuntos da linguagem SQL 
Sql :: id INT NOT NULL AUTO_INCREMENT 
Sql :: mysql pv progres 
Sql :: get all databases and their tables without primary key mysql 
Sql :: child row: a foreign key constraint fails 
Sql :: how to run sql script in postgresql in windows 
Sql :: how to add postgres table in netbeans 
Sql :: implizite joins sql 
Sql :: sql menampilkan data tabel 
Sql :: ring MySQL get the inserted row id 
Sql :: mysql query problems and solutions 
Sql :: import sheets doc into databricks 
Sql :: Raw into column 
Sql :: sql interview query questions 
Sql :: sql workbench 
Sql :: SQL Injection Using Always True Condition 
Sql :: undefined get_magic_quotes_gpc() in sqlite 
Sql :: how to escape single quotes in SQL 
Sql :: sql comparison operators 
Sql :: How to fix a collation conflict in a SQL Server query 
Sql :: visual c++ 2019 redistributable package mysql workbench 
Sql :: select all fields from table 
Sql :: install phpmyadmin pma 
Sql :: SELECT * INTO ROW NUMBER 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =