作者weisor (无所事事)
看板Database
标题Re: [SQL ] SQL2000 怎麽select出某个DB内的所有Ta …
时间Sun Aug 6 19:28:56 2006
※ 引述《stja (风)》之铭言:
: 请问
: SQL server 2000 中
: 怎麽下select 指令
: 得到某个DB的所有table名称
select name from sys.tables
或
sp_tables
: 和
: 得到某个table 内的所有栏位名称和相对的栏位型态??
select sys.tables.name, sys.columns.name, sys.types.name from sys.tables
join sys.columns on sys.columns.object_id = sys.tables.object_id
join sys.types on sys.types.user_type_id = sys.columns.user_type_id
where sys.tables.name = 'tablename'
或
sp_columns tablename
: 因我想让某只程式可以得到动态的资料
: 感谢 ^^
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.104.29.214