2010-07-11 73 views

回答

1
select column_name from information_schema.columns 
where table_name = 'YourTableName' 
order by ordinal_position 

这将拉取您要查找的数据,剩下的数据将其绑定到您的下拉列表中。

+0

用户是否需要更高的权限才能查询与正常用户表相比较的'information_schema'系统表? – 2011-01-12 01:21:35

0

在任的看看:

SELECT * FROM sys.columns 
SELECT * FROM INFORMATION_SCHEMA.COLUMNS 

...类似的东西你以后?