Home [SQL] 取得資料表資訊 SP_HELP、SP_TABLES
Post
Cancel

[SQL] 取得資料表資訊 SP_HELP、SP_TABLES

取得資料表資訊

  • sp_help:無引數的狀態下執行sp_help,會列出目前資料庫中所有物件的物件名稱、擁有者和物件類型。
  • sp_tables:列出資料庫中所有資料表。
1
2
3
4
sp_help
sp_help 'Persons'

sp_tables

MSDN - sp_help (Transact-SQL)
MSDN - sp_tables (Transact-SQL)

This post is licensed under CC BY 4.0 by the author.