Search notes:

INFORMATION_SCHEMA.columns

Determining column names and data types of a table

The column names and their data types can be determined with the columns view in in INFORMATION_SCHEMA:
select
   col.column_name,
   col.data_type,
   col.is_nullable
from
   information_schema.columns col
where
-- col.table_catalog = 'xyz'      and
-- col.table_schema  = 'xyz'      and
   col.table_name    = 'TQ84_CPG'
order by
   col.ordinal_position;
Github repository about-MSSQL, path: /administration/schemas/INFORMATION_SCHEMA/columns/select-datatypes.sql
An alternative way is to use the stored procedure sp_columns.

See also

Table columns
INFORMATION_SCHEMA
sys.columns

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758206544, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/administration/schemas/INFORMATION_SCHEMA/columns/index(64): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78