增压器两根钉脱落了:请问有人能解释一下这段SQL文?

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 15:31:59
select t5.t_pr_projectname,
t4.t_mo_modulename,
t3.t_ai_appraisalfullname
from t_review_bill t1,
t_review_appraisal t2,
t_appraisal_item t3,
t_module t4,
t_project t5
where t1.t_rb_managerid = t2.t_ra_managerid
and t4.t_mo_projectid = t1.t_rb_projectid
and t2.t_ra_appraisalid = t3.t_ai_appraisalid
and t1.t_rb_problemsts = '3'
and t1.t_rb_enddate >= (Sysdate-7)
and t2.t_ra_appraisalsts = '0'
and t5.t_pr_projectid = t1.t_rb_projectid
order by t3.t_ai_upddate ,
t1.t_rb_projectid ,
t4.t_mo_moduleid ,
t3.t_ai_bclassification ,
t3.t_ai_sclassification

select * from * where * order by *
的语句,仔细看一下,就知道是查询语句,只不过内容、表和条件多一些。
分开:
select

t5.t_pr_projectname,
t4.t_mo_modulename,
t3.t_ai_appraisalfullname
from t_review_bill t1,
t_review_appraisal t2,
t_appraisal_item t3,
t_module t4,
t_project t5

from

t_review_bill t1,
t_review_appraisal t2,
t_appraisal_item t3,
t_module t4,
t_project t5

where
t1.t_rb_managerid = t2.t_ra_managerid
and t4.t_mo_projectid = t1.t_rb_projectid
and t2.t_ra_appraisalid = t3.t_ai_appraisalid
and t1.t_rb_problemsts = '3'
and t1.t_rb_enddate >= (Sysdate-7)
and t2.t_ra_appraisalsts = '0'
and t5.t_pr_projectid = t1.t_rb_projectid

order by

t3.t_ai_upddate ,
t1.t_rb_projectid ,
t4.t_mo_moduleid ,
t3.t_ai_bclassification ,
t3.t_ai_sclassification

查询语句,
其实没有那么复杂.