BETWEEN
BETWEEN is used to display rows based on a range of values.
SELECT FIRST_NAME, SALARY FROM EMPLOYEE
WHERE SALARY BETWEEN 4000 and 10000;
NOTE: Values specified with the BETWEEN condition are inclusive. We have to specify the lower limit first.
IN
IN is used to test for values in a list
SELECT FIRST_NAME, SALARY, EMP_ID FROM EMPLOYEE
WHERE EMP_ID IN (150,250,300);
NOTE: THE IN condition can be used with any data type.
BETWEEN is used to display rows based on a range of values.
SELECT FIRST_NAME, SALARY FROM EMPLOYEE
WHERE SALARY BETWEEN 4000 and 10000;
NOTE: Values specified with the BETWEEN condition are inclusive. We have to specify the lower limit first.
IN
IN is used to test for values in a list
SELECT FIRST_NAME, SALARY, EMP_ID FROM EMPLOYEE
WHERE EMP_ID IN (150,250,300);
NOTE: THE IN condition can be used with any data type.
No comments:
Post a Comment