高手请教啊,,怎么用sql 语句 把表1 里面的数据查询出来显示的是表2 的样式??高手来啊

[复制链接]
查看11 | 回复1 | 2012-2-14 13:12:59 | 显示全部楼层 |阅读模式
假设表1的3个字段名字分别为name,date,scoreselect distinct name,(select score from table1 where a.name=name and date='14')as '14',(select score from table1 where a.name=name and date='15')as '15',(select score from table1 where a.name=name and date='16')as '16'from table1 a大概这样吧,你试试先...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行