SQL 查看某个表被哪些存储过程或者视图使用
--查询某个表被哪些视图/存储过程使用(type='P':表示存储过程,type='V':表示视图)
SELECT OBJECT_NAME(id) FROM syscomments
WHERE id IN(SELECT object_id FROM sys.objects WHERE type='P')
AND text LIKE '%表名称%'
--查看字段在哪些表中使用
select [name] from [库名].[dbo].sysobjects where id in(select id from [库名].[dbo].syscolumns Where name='字段名')
SQL 查看某个表被哪些存储过程或者视图使用的更多相关文章
- Sql Server 数据库表结构,存储过程,视图比较脚本
顶级干货 用来比较两个数据库之间 表结构,存储过程及视图差异的存储过程,直接复制对应的存储过程,无需改动,直接在数据库中执行(传递要比较的数据库参数)即可 1.两个数据库之间存储过程及视图差异比较的存 ...
- sql查看所有表大小的方法
sql查看所有表大小的方法. 代码: declare @id int ) declare @pages int declare @dbname sysname ,) ,) ,) create tabl ...
- 查询某张表被哪些存储过程或者视图用到的sql语句
/*查询某张表被哪些存储过程或者视图用到的sql语句*/select distinct object_name(id) from syscomments where id in (select id ...
- Sql:查看数据库表和表结构的语句
T-sql 显示表结构和字段信息的sql语句: exec sp_help tablename; ~~使用存储过程 sp_help 显示数据库包含哪些表的sql语句: use yourDBname;se ...
- SQL 查询某个表被哪些存储过程使用到
--1.查询某个表被哪些存储过程使用到 : select distinct object_name(id) from syscomments where id in (select object_id ...
- SQL 查看数据库表的容量大小
--==============查看数据库表的容量大小========start================================?============ Create Table # ...
- SQL查看所有表的大小
--查看所有表的大小 declare @id int ) declare @pages int declare @dbname sysname ,) ,) ,) create table #spt_s ...
- SQL SERVER获取表在哪些存储过程中使用过
1.获取某张表在哪些存储过程中使用到 select distinct object_name(id) from syscomments where id in (select object_id fr ...
- sql查看数据库表使用情况
如有更好的方式,希望交流. 感谢热心人,cc谢过 EXEC sys.sp_MSforeachtable @precommand = N'create table ##( 表名 sys ...
随机推荐
- vue-quill-editor的用法
1. main.js引入vue-quill-editor import VueQuillEditor from 'vue-quill-editor' import 'quill/dist/quill. ...
- flask 第十篇 after_request before_request
Flask我们已经学习很多基础知识了,现在有一个问题 我们现在有一个 Flask 程序其中有3个路由和视图函数,如下: from flask import Flask app = Flask(__na ...
- 20175329&20175313&20175318 2019-2020 《信息安全系统设计基础》实验二
我们一个小组都在实验前40mins提前做完但是因为队员截图发的迟没能及时提交上蓝墨云班课的任务超时 希望老师能看见将我的经验改正,谢谢老师 https://www.cnblogs.com/xiannv ...
- QString介绍
QString stores a string of 16-bit QChars, where each QChar corresponds one Unicode 4.0 character. 一. ...
- leetcode-hard-ListNode-Copy List with Random Pointer-NO
mycode 报错:Node with val 1 was not copied but a reference to the original one. 其实我并没有弄懂对于ListNode而言咋样 ...
- 【MyBatis】【SQL】删除最快纪录诞生,从一千万条记录中删除八百万条仅用2分6秒
在 https://www.cnblogs.com/xiandedanteng/p/11669629.html 里我做个一个循环按时间查ID并删除之的程序,运行时间是4分7秒. 但是这个程序走了很多次 ...
- 前端知识点回顾之重点篇——jQuery实现的原理
jQuery jQuery的实现原理 参考:https://blog.csdn.net/zhouziyu2011/article/details/70256659 外层沙箱和命名空间$ 为了避免声明了 ...
- Android跨进程通信Content Provider
Content Provider ContentProvider在android中的作用是对外共享数据,也就是说你可以通过ContentProvider把应用中的数据共享给其他应用访问,其他应用可以通 ...
- LC 980. Unique Paths III
On a 2-dimensional grid, there are 4 types of squares: 1 represents the starting square. There is e ...
- Horovod 通信策略
因为最近的工作要和Horovod打交道,所以分析了Horovod的源码.在这里记一笔. Horovod有几个亮点,第一,它不依托于某个框架,自己通过MPI建立了一套分布式系统,完成了allreduce ...