How does =
differ from =:
?
My code snippet below only works when using =:
, however when looking through the SOQL documentation, I mostly see examples using =
.
public class AccountUtils {
public static List<Account> accountsByState(String abbr) {
list<Account> result = [SELECT ID, Name FROM Account WHERE BillingState =: abbr];
system.debug(result);
return result;
}
}
Versus an example from the documentation that uses =
:
SELECT Id
FROM Case
WHERE Contact.LastName = null