Oracle Study Notes 006 (operator)

Here Insert Picture Description

Arithmetic operators

Arithmetic operators mainly +, -, *, /, which are binary operators, its use requires two operands to be operated.

Join operator

In oracle, with the double pipe connection string (||) represents

--将工资大于1000$的员工的姓名和工资拼接输出

SELECT ename||'is a'||job FROM emp WHERE salary>1000;

Comparison Operators

  • Relational operators primarily by size comparison operation using the relationship

    Equal =

    <Less than

    <= Less than or equal

    > Greater than

    > = Greater than or equal

    Does not mean:
    ! =, ^ =, <>, = Not XXX yyy, Not (XXX = yyy)

Empty judgment

It is null if the operand is NULL returns TRUE

is not null

Fuzzy query

like fuzzy string comparison

not like

boolean operation

AND two conditions must be met

OR as long as one of the two conditions

NOT negated

Wildcards

In the where clause, can use wildcards with conditions like

% (Percent sign): used to represent any number of characters, or may have no character.

_ (Underscore): Indicates the exact unknown character.

? (Question mark): used to indicate the exact unknown character.

# (Pound sign): used to indicate the exact Arabic numerals, 0-9.

[AZ] (brackets): it is used to represent a range of characters, in this case from a to z.

SQL operator precedence

An arithmetic operator

Connector 2

3 Comparison operators

4 IS[NOT]NULL, LIKE, [NOT]IN

5 [NOT] BETWEEN

6 NOT

7 AND

8 OR

Suitable location

Where conditions are for comparison:
  equal: =, <, <=,>,> =, <>
  comprising: IN, NOT IN EXISTS, NOT EXISTS
  range: BETWEEN ... AND, NOT BETWEEN ... AND
  fuzzy matching: LIKE, NOT LIKE
  verification null values: IS NULL, IS NOT NULL
  Boolean operators: AND, OR, NOT


While studying records, if any deficiencies welcome message pointing ...

Published 63 original articles · won praise 1 · views 2023

Guess you like

Origin blog.csdn.net/qq_45061361/article/details/104874665