Posts

Showing posts with the label IN NOT IN

Relational operators, Logical Operators, Between operator, IN operator, Like operators

  Relational or Comparison operators Ø   <, >, =, <=, >= ,Not equal to (<>, !=, ^=)      Select * from emp where deptno=10;      Select * from emp where deptno<>10; this means not equal to 10.       Select * from emp where sal>1500; Logical operators Ø   AND, OR, NOT Ø   Select * from emp where job=’MANAGER’ AND deptno=10; Ø   Select * from emp where job=’MANAGER’ OR deptno=10; Ø   Select * from emp where NOT SAL=0; Between …. And , Not Between ….. And Ø   Select * from emp where sal between 0 and 1500; Ø   Select * from emp where sal not between 0 and 1500; IN , NOT IN Ø   Select * from emp where job in('PRESIDENT','CLERK'); Ø   Select * from emp where job not in('PRESIDENT','CLERK'); Like, Not Like Ø   ‘%’ represents any sequence of zero or more characters Ø   ‘_’ represents single char only in that position Ø   Sel...