Como obter os tipos de dados das colunas em Consulta (SELECT) existente na linguagem de Manipulação de Dados (DML) do Azure SQL/SQL Server
This T-SQL code queries the information schema information (INFORMATION_SCHEMA. COLUMNS) for details about the columns in all tables in the database. I'll explain each part of the code:
SELECT TABLE_NAME THE 'Table', COLUMN_NAME THE 'Column', DATA_TYPE THE 'Type' FROM INFORMATION_SCHEMA. COLUMNS ORDER BY TABLE_NAME
Column', DATA_TYPE AS 'Type'
FROM INFORMATION_SCHEMA. COLUMNS
TABLE_NAME:
code returns information about the columns of all tables in the database, including the table name, column name, and column data type. The results are sorted by the table name. This query is useful for getting an overview of the columns present in the database tables.
Data Scientist and Consultant for Digital and Analytics Solutions
@fabioms