हिंदी

Compare the output produced by the query in example 8.6 and the following query and differentiate between the OR and AND operators.

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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 8: Introduction to Structured Query Language (SQL) - Intext Questions [पृष्ठ १६१]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 11
अध्याय 8 Introduction to Structured Query Language (SQL)
Intext Questions | Q 17. | पृष्ठ १६१
Advertisements
Share
Notifications



      Forgot password?
Use app×