本文主要是介绍查看表与视图的依赖,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
alter function F_Get_DepentTable_Ralation(
@table sysname
)
/*
查看表与视图的依赖
*/
returns table
as
return(
SELECT sysobjects.name AS 'view', sysobjects_1.name AS 'depend table'
FROM sysobjects INNER JOIN
sysdepends ON sysobjects.id = sysdepends.id INNER JOIN
sysobjects sysobjects_1 ON sysdepends.depid = sysobjects_1.id
WHERE (sysobjects.xtype = 'v') AND (sysobjects_1.name = @table)
GROUP BY sysobjects.name, sysobjects_1.name)
这篇关于查看表与视图的依赖的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!