Last active
May 30, 2017 08:57
-
-
Save igorpronin/9ddae59ed7bc6f523756261da2cea918 to your computer and use it in GitHub Desktop.
Вывести имена колонок и тип данных для определенной таблицы
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 1 | |
select column_name, data_type | |
from information_schema.columns | |
where table_name = 'users'; | |
-- 2 | |
SELECT | |
column_name, data_type, character_maximum_length | |
FROM | |
information_schema.COLUMNS | |
WHERE | |
TABLE_NAME = 'sales_funnel'; | |
-- 3 | |
SELECT | |
* | |
FROM | |
information_schema.COLUMNS | |
WHERE | |
TABLE_NAME = 'sales_funnel'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment