how to know the datatype of a column in sql code example
Example 1: sql query to get column data type in sql
SELECT DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME = 'yourTableName' AND
COLUMN_NAME = 'yourColumnName'
Example 2: datatype intable daatbase ccheck
SELECT DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME = 'table_name' AND
COLUMN_NAME = 'column_name'