• #36299
    Salesforce | Aman Aman #4
    Forcetalks

    What is the difference between SOQL and SOSL in Salesforce?

    What is the difference between SOQL and SOSL in Salesforce?

     

    #36300
    Salesforce | shariq shariq #1
    Forcetalks

    The differences are mentioned in the table below:

    SOQL vs SOSL

    SOQL (Salesforce Object Query Language)

    Only one object can be searched at a time

    Can query any type of field

    Can be used in classes and triggers

    DML Operation can be performed on query results

    Returns records

    SOSL (Salesforce Object Search Language)

    Many objects can be searched at a time

    Can query only on email, text or phone

    Can be used in classes, but not triggers

    DML Operation cannot be performed on search results

    Returns fields

    #36378
    Salesforce | Parul Parul #2
    Forcetalks

    SOQL:
    1) SOQL (Salesforce Object Query Language ) retrieves the records from the database by using “SELECT” keyword.
    2) By Using SOQL we can know in Which objects or fields the data resides.
    3) We can retrieve data from single object or from multiple objects that are related to each other.
    4) We can Query on only one table.

    SOSL:
    1) SOSL(Salesforce Object Search Language) retrieves the records from the database by using the “FIND” keyword.
    2) By using SOSL, we don’t know in which object or field the data resides.
    3) We can retrieve multiple objects and field values efficiently when the objects may or may not be related to each other.
    4) We can query on multiple tables.

    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2019 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?