There are two ways to express inequality in Oracle: "<>" operator is the most recommended inequality operator. It is used to compare whether two values are different and return a Boolean value (TRUE or FALSE). "!=" operator has the same function as the "<>" operator, but is less used.
The expression of inequality in Oracle
In Oracle, the inequality operator is represented as "<> ;" or "!=".
Use the "<>" operator
"<>" is the recommended inequality operator in Oracle. It is used to compare two values or expressions and returns a Boolean value (TRUE or FALSE) indicating whether they are not the same.
For example:
<code>SELECT * FROM table_name WHERE column_name <> 'value';</code>
This will return all values in the "table_name" table for which the "column_name" column is not the same as "value".
Using the "!=" operator
The "!=" operator is equivalent to the "<>" operator, but it is less commonly used. It is used to compare two values or expressions and returns a Boolean value indicating whether they are not different.
For example:
<code>SELECT * FROM table_name WHERE column_name != 'value';</code>
This will return all values in the "table_name" table for which the "column_name" column is not the same as "value".
Note:
The above is the detailed content of How to express not equal in oracle. For more information, please follow other related articles on the PHP Chinese website!