Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 506 Bytes

File metadata and controls

25 lines (16 loc) · 506 Bytes

高级 SQL

不同于 SQL Cheat Sheet 中的一般语法,本文主要整理收集一些高级但是很有用的 SQL

数据库

查看表的基本信息

SELECT * FROM information_schema.tables
WHERE table_schema = 'test' AND table_name = 'user';

查看表的列信息

SELECT * FROM information_schema.columns
WHERE table_schema = 'test' AND table_name = 'user';

参考资料