• SQL AND OR Operators – SQL TUTORIAL | Software Testing Material

    SQL AND OR Operators:

    In this post, we will see both SQL AND OR Operators in detail.

    SQL AND Operator: It fetches the records only if both the first and the second condition are true.

    Syntax:

    Example:

    In the below image, you could see two SELECT queries. First SELECT query returns the complete records from the table SCOREBOARD. Second SELECT query returns only the values where the value in the Playername column is equal to Sachin and value in the Runs column is equal to 100. Both the conditions should become true.

    SQL And

    SQL OR Operator: It fetches the records if any one of the condition is true.

    Syntax:

    Example:

    In the below image, you could see two SELECT queries. First SELECT query returns the complete records from the table SCOREBOARD. Second SELECT query returns only the values where the value in the Playername column is equal to Sachin or value in the Runs column is equal to 90.

    SQL Or

    In the next tutorial, we will see How To INSERT Data in a Table in SQL

    Check out the complete SQL Tutorial by clicking on below link:

    Sharing is caring.

    Share on facebook
    Facebook
    Share on twitter
    Twitter
    Share on linkedin
    LinkedIn

    Like This Post?

    We have a lot more where that came from?

    We only send really good stuff occasionally, promise.

    Rajkumar SM

    Leave a Comment

    Your email address will not be published. Required fields are marked *

    Scroll to Top
    API Testing eBook

    DOWNLOAD FOR FREE