警告是什么意思?
为什么第二个例子比第一个更糟糕?
SELECT product_id, prod.name name, sample_id
FROM lims.sample JOIN lims.product prod USING (product_id)
对比
SELECT product_id, prod.name name, sample_id
FROM (SELECT sample_id, product_id FROM lims.sample)
JOIN lims.product prod
/* ADVICE: [131] This item has not been declared, or it refers to a label */
USING (product_id)
/* ADVICE:
ADVICE SUMMARY
Count Recommendation
----- --------------
1 [131] This item has not been declared, or it refers to a label
The Oracle equivalent error messages are PLS-00320 and
PLS-0321.
*/
仅供参考:两个查询都运行良好并返回相同的结果。