运行 在 MySQL 上进入错误代码 1111 我该如何解决?
Running into Error Code 1111 on MySQL how can I fix it?
SELECT * 从产品中 P_CODE = (SELECT P_CODE 从行中 LINE_TOTAL > AVG(LINE_TOTAL));
您可能需要这个:
SELECT *
FROM PRODUCT
WHERE P_CODE in (SELECT P_CODE
FROM LINE
WHERE LINE_TOTAL > (select AVG(LINE_TOTAL) from LINE)
);
SELECT * 从产品中 P_CODE = (SELECT P_CODE 从行中 LINE_TOTAL > AVG(LINE_TOTAL));
您可能需要这个:
SELECT *
FROM PRODUCT
WHERE P_CODE in (SELECT P_CODE
FROM LINE
WHERE LINE_TOTAL > (select AVG(LINE_TOTAL) from LINE)
);