Useful system stored procedures in SQL Server

后端 未结 12 1014
醉话见心
醉话见心 2021-01-30 03:17

I recently discovered that I could use the sp_help to get a table definition and have been hooked onto it since then. Before my discovery, I had to open up the Obje

12条回答
  •  旧巷少年郎
    2021-01-30 03:47

    sp_ helpindex [table] - shows you index info (same info as sp_help)

    sp_helpconstraint [table] - shows you primary/foreign key/defaults and other constraints *

    sp_depends [obj] - shows dependencies of an object, for example:

    sp_depends [table] - shows you what stored procs, views, triggers, UDF affect this table

    sp_depends [sproc] - shows what tables etc are affected/used by this stored proc

提交回复
热议问题