0 votes
1 view
in SQL by (34.6k points)

Can anyone tell me how to check data type in SQL?

1 Answer

0 votes
by (72.1k points)

You can use the following syntax to check the data type of a specific column in a table.

SELECT DATA_TYPE

FROM INFORMATION_SCHEMA.COLUMNS

WHERE

     TABLE_NAME = 'table_name' AND

     COLUMN_NAME = 'column_name' 

You can also use the describe statement to check the datatypes of all the columns of the table as follows: 

DESCRIBE table_name;

If you are interested in SQL, then check out this SQL Course by Intellipaat that offers instructor-led training, certification, and job assistance. 

Related questions

0 votes
1 answer
asked May 4 in SQL by Sudhir_1997 (34.6k points)
0 votes
1 answer
asked Apr 28 in SQL by Sudhir_1997 (34.6k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...