GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing www.geeksforgeeks.org — SQL Operators - GeeksforGeeks SQL OperatorsLast Updated : 29 Aug, 2026 SQL operators are symbols or keywords used to perform operations on data in SQL queries.
![]() Arithmetic OperatorsArithmetic operators are used to perform mathematical operations on numeric values.
Example
Output: ![]()
Comparison OperatorsComparison operators are used to compare two values or expressions. They are commonly used with the WHERE clause to filter records.
Example: Consider an employees table: ![]() The following query uses the greater-than operator:
Output: ![]() The query returns employees whose salary is greater than Logical OperatorsLogical operators are used to combine or modify multiple conditions.
Example:
Output: ![]()
Example:
Output: ![]()
Special OperatorsSQL also provides operators for specific filtering and conditional operations. BETWEENThe BETWEEN operator checks whether a value falls within a specified range.
Output: ![]()
INThe IN operator checks whether a value matches any value in a specified list.
Output: ![]() LIKEThe LIKE operator is used to search for a specific pattern in text values.
Output: ![]()
EXISTSThe EXISTS operator checks whether a subquery returns at least one row. SELECT * Output: ![]()
IS NULLThe IS NULL operator checks whether a value is NULL.
Output: ![]()
IS NOT NULLThe IS NOT NULL operator checks whether a value is not NULL.
Output: ![]() Bitwise OperatorsSQL bitwise operators are used to perform operations on the individual bits of integer values. These operators work on the binary representation of numbers and are commonly used with flags, permissions and status values. Types of Bitwise Operators
ExampleConsider the following values:
Output For a database system that supports these operators: ![]() A bitwise AND operation can be used to check whether a particular permission is enabled:
Output: ![]() The Compound OperatorsCompound operators combine an arithmetic or bitwise operation with an assignment operation. They allow a value to be modified and assigned back to the same variable or column in a single statement. Types of Compound Operators
ExampleThe += operator can be used to increase the salary of all employees by 5000.
Output: ![]() Comment ExploreData Constraints & Aggregate Functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |