Operators

Operators can be used for comparing values or for assigning values. There are several operators and they may be used in different SQL statements and clauses. Some can be used somewhat on their own, not within an SQL statement clause.

For comparing valuesstring or numericyou can use symbols such as the equal-sign (i.e., =) or the exclamation point and the equal-sign together (i.e., !=). You might use these in WHERE clauses or within a flow-control statement or function (e.g., IF( )). You can also use basic regular expressions with the LIKE operator.

For assigning values, you can also use the equal-sign or other arithmetic symbols (e.g. plus-sign). You might do this with the SET statement or in a SET clause in an UPDATE statement.

Arithmetic Operators

Assignment Operators

Bit Functions and Operators

Comparison Operators

Logical Operators

Other Operators Articles

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.