主题:一个很简单的问题;各位大哥帮帮忙
			
 aierduo
				 [专家分:0]  发布于 2005-10-21 14:48:00							
			在Sql Server如何选取一个表中的列表名??
						
					 
		
			
回复列表 (共4个回复)
		
								
				沙发
				
					
cwb1128 [专家分:3120]  发布于 2005-10-21 17:01:00				
				不好意思,我不明白你什么意思。。能举个例子吗?
							 
						
				板凳
				
					
aierduo [专家分:0]  发布于 2005-10-21 19:00:00				
				比如在Northwind数据库中的Customers 表中
我只要列表名如:
我要 CustomerID CompanyName的名称
而不要CustomerID CompanyName这两列的数据
							 
						
				3 楼
				
					
cwb1128 [专家分:3120]  发布于 2005-10-21 20:17:00				
				select b.name col from sysobjects a,syscolumns b,systypes c
where a.xtype = 'U' and a.id = b.id and b.xtype = c.xtype and b.xusertype = c.xusertype and a.name='Customers' 
							 
						
				4 楼
				
					
aierduo [专家分:0]  发布于 2005-10-22 00:34:00				
				谢谢!!
							 
									
			
我来回复