SQL AND Statement

The SQL AND statement uses the AND operator to return records where both the first condition and second condition set are true. It is usually used together with the WHERE clause.

SQL AND statement

SELECT column_name(s)

FROM table_name

WHERE column_name operator value

AND column_name operator value


Database Table “Members”

Id FirstName LastName Email City Phone
1 Gilbert Duncan [email protected] Newark 973-600-3300
2 Elvis Daniels [email protected] Piscataway 862-600-3050
3 Michael Green [email protected] Detroit 732-500-5050
4 Kelvin Graham [email protected] Detroit 732-555-5050

SQL AND Example

SELECT *

FROM Members

WHERE City=’Detroit’

AND Email=’[email protected]

RESULT of SQL AND statement above will be

Id FirstName LastName Email City Phone
3 Michael Green [email protected] Detroit 732-500-5050