SqlServer 查看数据库中所有视图

SELECT
Name,--视图名字
Definition --视图内容
FROM sys.sql_modules AS m 
INNER JOIN sys.all_objects AS o ON m.object_id = o.object_id
WHERE o.[type] = 'v'

 

posted @ 2019-08-15 08:47  派大星帅帅  阅读(7405)  评论(0编辑  收藏  举报