示例:
SQL> select
c.customer#,o.isbn,b.retail,o.paideach,nullif(paideach,retail)
2 from books b join orderitems o using(isbn)
3 join orders c using(order#)
4 where c.order# in (1003,1007);
select c.customer#,o.isbn,b.retail,o.paideach,nullif(paideach,retail)
from books b join orderitems o using(isbn)
join orders c using(order#)
where order# in (1003,1007);
ORA-25154: USING 子句的列部分不能有限定词
错误存在于o.isbn中.
修改以后正确运行
SQL> select c.customer#,isbn,b.retail,o.paideach,nullif(paideach,retail)
2 from books b join orderitems o using(isbn)
3 join orders c using(order#)
4 where order# in (1003,1007)
5 ;