出现笛卡尔积的sql语句
select * from (
select wpi.target,wpi.content,wpi.startTime,wpi.endTime,wp.month,wp.year,wp.week,wp.comment_status from wpi,wp where wpi.wk_id in(
select> select UserNo from [user] where mobilePhone='xxx'
)
and year='2012' and month='11')) as c
正常的SQL
select * from (
select wpi.target,wpi.content,wpi.startTime,wpi.endTime,W.month,W.year,W.week,W.comment_status from wpi , wp W where wpi.wk_id =w.id and w.id=(
select> select UserNo from [user] where mobilePhone='xxx'
)
and year='2012' and month='11') ) as d