October 1, 2012

Difference between SOSL and SOQL

SOSL  stands(Salesforce object search language)
SOQL stands for(Salesforce object query language)
Works on multiple objects at the same time.
Need to write different SOQL for multiple objects.
Cannot be used in Triggers.
Can be used in Triggers.

Unlike SOQL, which can only query one object at a time and multiple objects only if they are related to each other, SOSL enables you to search text, email, and phone fields for multiple objects simultaneously.