在sql数据库里的,查询分析器里,导出查询结果,但没有列名称,怎么才能把列名称也导出??
1个回答
展开全部
select * from Table1
列名另外再写一段取,导出后复制过去就行
declare @title varchar(8000)
set @title=''
select @title=@title+name+',' from syscolumns where id=(select id from sysobjects where xtype='u' and name='Table1') order by colorder
print @title
列名另外再写一段取,导出后复制过去就行
declare @title varchar(8000)
set @title=''
select @title=@title+name+',' from syscolumns where id=(select id from sysobjects where xtype='u' and name='Table1') order by colorder
print @title
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询