1.获取某张表在哪些存储过程中使用到 select distinct object_name(id) from syscomments where id in (select object_id from sys.objects where type ='P') and text like'%tableName%' 2.获取某张表的创建时间 select * from sys.tables where name ='tableName ' order by create_date desc 3.
1.按最近修改排序所有存储过程 SELECT [name], [create_date], [modify_date] FROM [sys].[objects] WHERE [type] = 'P' -- 这里也可以替换为:'U','IF','TR'分别代表用户表,自定义函数,触发器 ORDER BY [modify_date] DESC 2.查询指定存储过程的创建及修改时间 select [name] ,create_date ,modify_date FROM sys.all_objec
1.检索关键字:sql server内置存储过程,sql server查看系统信息 2.查看磁盘空间:EXEC master.dbo.xp_fixeddrives , --查看各个数据库所在磁盘情况SELECT DB_NAME(df.database_id) as dbName, physical_name AS DataFile, size AS 'FileSize(MB)', volume_mount_point AS Drive, AS VARCHAR) + ' GB' AS DriveS
where in 的参数化查询实现 首先说一下我们常用的办法,直接拼SQL实现,一般情况下都能满足需要 string userIds = "1,2,3,4"; using (SqlConnection conn = new SqlConnection(connectionString)) { conn.Open(); SqlCommand comm = new SqlCommand(); comm.Connection = conn; comm.CommandText = string