SQL And

SQL And is used when we want to use two or more conditions, all have common match.

Syntax


SELECT column1, column2, column3..........,columnN FROM table_name 
WHERE condition1 AND condition2 AND condition3 . . . . . .  AND conditionN;



Take Table Student,

StudentID StudentName StudentCity
1 Rahul Chandigarh
2 Karan Mohali
3 Neha Delhi
4 Manpreet Chandigarh
5 Ajay Delhi


SQL Query with AND



SELECT * FROM Student WHERE StudentID='4' AND StudentCity='Chandigarh';



StudentID StudentName StudentCity
4 Manpreet Chandigarh


Back To Top