SELECT a.title,a.SEND_STAFF_ID,a.SEND_DATE,a.STATE,a.order_id
from order_main_info a,INT_AD_INFO c
WHERE a.order_type='32' and
a.state='0' and c.order_id=a.order_id and
a.order_id=(select order_id from(select rownum rn,order_id
from ORDER_DEAL_INFO where order_id=(select order_id from order_main_info where order_type='32' and state='0'))
where rn=(select count(*) from ORDER_DEAL_INFO where order_id=(select order_id from order_main_info where order_type='32' and state='0')))
J-CN工作室
www.j-cn.org