有一个数据表的记录为:
id sqt
1 123
2 456
3 789
4 223
使用sql语句将上述记录转换为
id sqt id sqt
1 123 2 456
3 789 4 223
select a.id,a.sqt,b.id,b.sqt from aaaa a join aaaa b on mod(b.id,2)+1=mod(a.id,2) and b.id – a.id =1
有一个数据表的记录为:
id sqt
1 123
2 456
3 789
4 223
使用sql语句将上述记录转换为
id sqt id sqt
1 123 2 456
3 789 4 223
select a.id,a.sqt,b.id,b.sqt from aaaa a join aaaa b on mod(b.id,2)+1=mod(a.id,2) and b.id – a.id =1
This entry was posted on 2010-03-23, 14:41 and is filed under oracle. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.
You must be logged in to post a comment.
Arclite theme by digitalnature | powered by WordPress