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';
1\d table_name or \d+ table_name
2or
3
4SELECT
5 table_name,
6 column_name,
7 data_type
8FROM
9 information_schema.columns
10WHERE
11 table_name = 'city';