1-- All information
2SELECT * FROM information_schema.columns
3WHERE table_schema = 'some_schema'
4AND TABLE_NAME = 'some_table';
5
6-- Or a more simplified version
7
8SELECT
9 table_name,
10 column_name,
11 data_type
12FROM
13 information_schema.columns
14WHERE
15 table_name = 'some_table';
16
1
2
3
4
5 SELECT
6 table_name,
7 column_name,
8 data_type
9FROM
10 information_schema.columns
11WHERE
12 table_name = 'city';