Difference Between SOQL and SOSL

SOQL : salesforce object Query Lanuage
i) return type is list
ii) soql used in triggers
iii) fetch records using SELECT
iv) Using SOQL we can Search only on one object at a time.
v) We can query on all fields of any datatype
 SOSL: Salesforce Object Search Languge
i) return type is List<List<sobject>
ii) sosl cannot used in triggers
iii) Fetch records using Find
iv ) Using SOSL we can search on many objects at a time.

v) We can query only on fields whose data type is text,phone and Email.

Comments

Popular posts from this blog

Community/Experience Cloud Interview Questions

Script to delete multiple records using Apex salesforce

Change Owner / Update record using Lightning Custom Button Salesforce