I have the following code :
SELECT Description FROM KeysDB WHERE Count='0 (Blocked)' OR ErrorCode='0xC004C060' AND Description LIKE '%Win%'
It works normally until I change it.
SELECT Description FROM KeysDB WHERE Count='0 (Blocked)' OR ErrorCode='0xC004C003' OR ErrorCode='0xC004C060' AND Description LIKE '%Win%'
I want to select all Windows product key with Count = 0 (Blocked) or ErrorCode = 0xC004C060 or ErrorCode = 0xC004C003
and
/ or
have different operator precedence. That means their binding strength is differently.
You can use parentheses to make it how you like. Not sure if this is how you intended it but you get the picture:
SELECT Description
FROM KeysDB
WHERE
(
Count='0 (Blocked)' OR ErrorCode='0xC004C003' OR ErrorCode='0xC004C060'
)
AND Description LIKE '%Win%'
User contributions licensed under CC BY-SA 3.0