Category: 05. Oracle Operators
-
Hierarchy Operator
Purpose: Used to query hierarchical data using a parent-child relationship.Syntax: Example: Explanation: This retrieves a hierarchy of employees starting from those without a manager (top level).
-
Set Operators
Operators: Example: Explanation: This retrieves unique first names from both the employees and managers tables.
-
Concatenation Operator
Purpose: Combines two or more strings into one.Operator: Example: Explanation: This creates a full name by concatenating first_name and last_name.
-
NULL Operator
Purpose: Tests for NULL values in a column. Syntax or Example: Explanation: This retrieves employees who do not belong to any department.
-
LIKE Operator
Purpose: Searches for a specified pattern in a column.Syntax: Example: Explanation: This retrieves employees whose first names start with “A”. The % wildcard represents zero or more characters.
-
IN Operator
Purpose: Tests whether a value matches any value in a list or subquery. Syntax: Example Explanation: This retrieves employees who work in departments 10, 20, or 30.
-
BETWEEN Operator
Purpose: Checks if a value lies within a specified range, inclusive.Syntax: Example: Explanation: This retrieves employees with salaries between 40,000 and 60,000.
-
Logical Operators
Purpose: Used to combine multiple conditions in a WHERE clause.Operators: Explanation: This retrieves employees in department 10 with a salary greater than 50,000.