日期:2014-05-17 浏览次数:20921 次
SELECT p.product_id, p.product_name, t.start_date, t.int_rate FROM (SELECT p.* ,t.* ,rownum over(PARTITION BY t.product_id ORDER BY t.start_date DESC) rn FROM product p LEFT JOIN t_product t ON p.product_id = t.product_id) WHERE rn = 1
------解决方案--------------------
是写错了
row_number() over()