Advertisements
Advertisements
प्रश्न
Compare the output produced by the query in example 8.6 and the following query and differentiate between the OR and AND operators.
SELECT *
FROM EMPLOYEE
WHERE Salary > 5000 OR
DeptId= 20;कोड लेखन
Advertisements
उत्तर
SELECT *
FROM EMPLOYEE
WHERE Salary > 5000 OR DeptId = 20;
Comparison between AND and OR
| Operator | Output |
|---|---|
| AND | Displays only those employees who satisfy both conditions: Salary > 5000 and DeptId = 20. |
| OR | Displays employees who satisfy at least one condition: Salary > 5000 or DeptId = 20, or both. |
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
