LoginSignup
2
1

More than 5 years have passed since last update.

テーブルの列情報・キー情報を取得する

Last updated at Posted at 2015-07-22

キーやら型やらぱぱっと確認したいときに。

  • 列情報の取得
sample1.sql
USE database
GO
EXEC sp_columns @table_name = N'table'
  • プライマルキーの取得
sample2.sql
USE database
GO
EXEC sp_pkeys @table_name = N'table'

詳しくはこのあたりを。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1