Created
August 21, 2020 03:56
-
-
Save suzuki-takashi/ad5b74ea43e251b72adbf1e7ad6e85a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[良い例] | |
SELECT A.NRJYUTYU,A.NRHINMOKU,B.TXHINBAN,B.TXHINMEI,A.QTJYUTYU | |
FROM | |
JTMS A | |
LEFT JOIN HINMOKU B | |
ON A.NRHINMOKU = B.NRHINMOKU | |
AND 300 >= B.PRHANBAI --この条件は結合条件です | |
[悪い例] | |
SELECT A.NRJYUTYU,A.NRHINMOKU,B.TXHINBAN,B.TXHINMEI,A.QTJYUTYU | |
FROM | |
JTMS A | |
LEFT JOIN HINMOKU B | |
ON A.NRHINMOKU = B.NRHINMOKU | |
WHERE | |
300 >= B.PRHANBAI --結合条件を抽出条件に書いてはいけない |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment