Skip to content

Instantly share code, notes, and snippets.

@ichiroku11
Created June 1, 2012 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ichiroku11/2848188 to your computer and use it in GitHub Desktop.
Save ichiroku11/2848188 to your computer and use it in GitHub Desktop.
テーブル名、カラム名、データ型を表示するクエリ
select
sys.tables.name,
sys.columns.name,
sys.types.name
from sys.tables
inner join sys.columns
on sys.tables.object_id = sys.columns.object_id
inner join sys.types
on sys.columns.user_type_id = sys.types.user_type_id
order by
sys.tables.name,
sys.columns.name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment