create table tb(材料费用 int,人工费用 int,机械费用 int,其他费用 int)
insert into tb select 150,260,330,400
go

declare @sql varchar(8000)
set @sql=''
select@sql=@sql+' union all select '''+name+''' as 费用类型,'+name+' as 数目 fromtb ' from syscolumns where id=object_id('tb') order by colid
set @sql=stuff(@sql,1,11,'')
exec(@sql)
drop table tb

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-12-11
  • 2022-12-23
  • 2021-10-22
相关资源
相似解决方案