AND Operator

The SQLite AND Operator is generally used with SELECT, UPDATE and DELETE statement to combine multiple conditions. It is a conjunctive operator which makes multiple comparisons with different operators in the same SQLite statement.

It is always used with WHERE Clause.

Syntax:

SELECT column1, column2, columnN   

FROM table_name  

WHERE [condition1] AND [condition2]...AND [conditionN];  

    Example:

    We have a table named ‘STUDENT’ having following data:

    Sqlite And operator 1

    Select all students from the table ‘STUDENT’ where AGE is greater than or equal to 25 AND fees is greater than or equal to 20000.00

    SELECT * FROM STUDENT WHERE AGE >= 25 AND FEES >= 15000;   

    Output:

    Sqlite And operator 2

    Comments

    Leave a Reply

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