
Operator Meaning
- < Less than
- <= Less than or equal to
- >= Greater than or equal to
- > Greater than
- = Equal to
- <> Not equal to
- BETWEEN Between two values (inclusive) ...AND...
- IN(set) Match any of a list of values
- LIKE Match a character pattern
- IS NULL Is a null value
Using Comparison Conditions :
- select*from emp where sal<3000;
- select*from emp where sal between 1 and 2999;
- Use the IN membership condition to test for values in a list:
- select*from emp where mgr in(7902,7698);
- Use the LIKE condition to perform wildcard searches of valid search string values
- Search conditions can contain either literal characters or numbers
• % denotes zero or many characters
• _ denotes one character - SELECT * FROM emp WHERE ename LIKE 'S%' ;
- Test for nulls with the IS NULL operator
- SELECT ename, mgr FROM emp WHERE mgr IS NULL ;
No comments:
Post a Comment