Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 65 - 2611_SmartGPT Pro V(5.0) C-8
P. 65

    SQL OPERATORS

                     SQL operators are used to perform operations on values in a SQL query. They enable access,
                     comparison and modification of data in various ways.

                     Some common types of operators in SQL are:
                       Arithmetic operators                    Comparison operators

                       Logical operators                       Special operators

                     ARITHMETIC OPERATORS
                     Arithmetic operators perform basic mathematical operations on numerical data. They include

                     the following types:

                                         Operator                             Description

                                + (Addition)                Adds two values.

                                - (Subtraction)             Subtracts one value from another.
                                * (Multiplication)          Multiplies two values.

                                / (Division)                Divides one value by another.
                                                            Returns the remainder when one value is divided
                                % (Modulus)
                                                            by another.

                     COMPARISON OPERATORS
                     Comparison operators are used to compare two expressions or values. They help in filtering
                     data based on conditions. They include the following types:

                                        Operator                              Description

                                            =              Checks if two values are equal.

                                         != or <>          Checks if two values are not equal.
                                            <              Checks if the left value is less than the right value.

                                                           Checks if the left value is greater than the right
                                            >
                                                           value.
                                                           Checks if the left value is less than or equal to the
                                           <=
                                                           right value.
                                                           Checks if the left value is greater than or equal to
                                           >=
                                                           the right value.

                                                                                              MySQL: My First Database  63

| 60 61 62 63 64 65 66 67 68 69 70 |