9条回答 默认 最新
- lovehehe87 2018-03-15 07:27关注
从数据库的层面上,使用union all
create view col2row
select time, 炉号 from tables
union all
select time, 真实度 from tables
union all
……
select time, 温度 from tables;
select * from col2row where time = '2018-03-01';这种方法主要的缺点是不利于扩展,一旦改报表样式需要调整语句,可以创建视图,这样需要的话仅调整视图来实现扩展
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报