I want to check the surname matching lastname and Pcode matching MailingPostalCode in the query of SOQL.
public class ContactSearch
{
public static list<contact> searchForContacts(String Surname,String PCode)
{
list<Contact> Listquery = [select ID, Name, LastName, MailingPostalCode from contact
where lastName IN : Surname];
}
}
IN
clause? do you have any issues faced with using simple=
comparison ?