由买买提看人间百态

topics

全部话题 - 话题: raiseweibi
(共0页)
n********6
发帖数: 1511
1
来自主题: Database版 - 2个月前用过outer join
此帖太弱,大牛请略过。
两个月前做报表需要用outer join,当时一时未想起来。
Table1: Project
PID, PName
1, waterdatabase
2, raiseweibi
3, enjoyweibi
Table2:Task
PID, TID, TName
1, 1, create entry
1, 2, say hi
3, 1, use weibi saving
Report1: Report
PID+TID, PName, TName
1.1, waterdatabase, create entry
1.2, waterdatabase, say hi
2, raiseweibi,
3.1, enjoyweibi, use weibi saving
Report2: Summary
PID, PName, CountTask
1, waterdatabase, 2
2, raiseweibi, 0
3, enjoyweibi, 1
若不用outjoin,“2, raiseweibi,”就不在报表中。
(共0页)