SQL Operator

SQL (Structured Query Language) uses various operators to perform operations and comparisons on data within a database. Here are some commonly used SQL operators:

  1. Arithmetic Operators:
    • Addition (+)
    • Subtraction (-)
    • Multiplication (*)
    • Division (/)
    • Modulo (%)
  2. Comparison Operators:
    • Equal to (=)
    • Not equal to (<> or !=)
    • Greater than (>)
    • Less than (<)
    • Greater than or equal to (>=)
    • Less than or equal to (<=)
  3. Logical Operators:
    • AND
    • OR
    • NOT
  4. String Operators:
    • Concatenation (|| or CONCAT)
    • Pattern matching (LIKE)
    • Pattern matching (REGEXP or RLIKE)
  5. NULL-related Operators:
    • IS NULL
    • IS NOT NULL
  6. Set Operators:
    • UNION
    • UNION ALL
    • INTERSECT
    • EXCEPT or MINUS

These operators can be used in SQL statements such as SELECT, INSERT, UPDATE, and DELETE to perform various operations and comparisons on data in relational databases.