标题: SQLSERVER中,列出某一个数据库下的视图名字及内容 [打印本页] 作者: 郑全 时间: 2022-2-18 16:55 标题: 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'
----------------------------------------------
Name Definition
spt_values create view spt_values as
select name collate database_default as name,
number,type collate database_default as type,low, high, status
from sys.spt_values