Learn T-SQL Commands with Samples
Skip Navigation Links
Skip Navigation Links.
Expand DatabaseDatabase
Expand TableTable
Expand ViewView
Expand Stored ProcedureStored Procedure
Expand Data FilteringData Filtering
Expand Data GroupingData Grouping
Expand JoinsJoins
Expand TriggerTrigger
Expand CursorCursor
Collapse OperatorsOperators
Expand ConstraintsConstraints
Expand FunctionsFunctions
Expand Conditional ProcessingConditional Processing
Expand LoopingLooping
Expand Error HandlingError Handling
Expand v.IMP Queriesv.IMP Queries
Expand XMLXML
Expand Query PerformanceQuery Performance
Expand QueriesQueries
Expand NormalizationNormalization
Expand CreateCreate
     

Comparison

 
EMP
ID Name Country Salary
1 Vijay India 6000
2 Bill USA 8000
3 Kris France 3000
      SELECT    *   FROM    EMP   WHERE   Salary  =     5000    -- Equal to
      SELECT    *   FROM    EMP   WHERE   Salary  !=    5000    -- Not equal to
      SELECT    *   FROM    EMP   WHERE   Salary  <>    5000    -- Not equal to
      SELECT    *   FROM    EMP   WHERE   Salary  <     5000    -- Less than
      SELECT    *   FROM    EMP   WHERE   Salary  !<    5000    -- Not Less than
      SELECT    *   FROM    EMP   WHERE   Salary  >     5000    -- Greater than
      SELECT    *   FROM    EMP   WHERE   Salary  !>    5000    -- Not Greater than
      SELECT    *   FROM    EMP   WHERE   Salary  <=    5000    -- Less than or equal to
      SELECT    *   FROM    EMP   WHERE   Salary  >=    5000    -- Greater than or equal to