SQL 随笔,以后再整理
update dsong set ratesp = (select 1.0*skiptime/playtime from song where song.filename=dsong.songname) where dsong.songname = (select filename from song where song.filename = dsong.songname)
update dsong set maxpcontinue = (SELECT max(pcontinue) FROM skipinfor where skipinfor.filename = dsong.songname) where dsong.songname = (select filename from skipinfor where skipinfor.filename = dsong.songname)
update dsong set maxscontinue = (SELECT max(scontinue) FROM skipinfor where skipinfor.filename = dsong.songname) where dsong.songname = (select filename from skipinfor where skipinfor.filename = dsong.songname)
update dsong set firstpicktimes = (select count(*) from firstpick where firstpick.filename = dsong.songname) where dsong.songname = (select filename from firstpick where firstpick.filename = dsong.songname)