SQL常用语句整理

 

SQL Server查询所有列:

SELECT tb.name AS table_name, t.name AS type_name, c.* FROM sys.all_columns AS c INNER JOIN sys.types AS t ON t.system_type_id = c.system_type_id
    INNER JOIN sys.tables AS tb ON tb.object_id = c.object_id
    WHERE t.name LIKE '%text%' OR t.name LIKE '%image%'

 

posted @ 2017-05-05 17:00  朝野布告  阅读(144)  评论(0编辑  收藏  举报