![]() |
|||
|
![]() |
![]() |
|
FULL A - Z Oracle Function Library (formerly named "Morgan's Library")
![]() Term: SET
Definition: UPDATE <table_name> Example Usage: UPDATE user_list If the value is purely numeric then it does not need to be enclosed in quotes: UPDATE user_list In this example the value is an evaluated variable, where the 'visits' value is incremented by 1: UPDATE user_list 2. As an Operator: In Oracle PL/SQL, SET operators are used to combine result set of more than one query into one result. The SQL queries using the SET operators are known as Compound queries. Set operators can be UNION, UNION ALL, INTERSECT, and MINUS. All involved SELECTs must have same number of selected columns and also be of the same data type. Example Syntax: Query 1 Example Usage: The SQL query below combines the result set of two queries using UNION set operator. SELECT EMPLOYEE_ID, JOB_ID, SALARY 3. As a Built In Function: As a function, SET is used to remove duplicate elements from a nested table. It takes a Nested Table input and returns a nested table type with distinct element values. Example Syntax: SET(nested table) Example Usage: The SQL query below removes duplicate elements from SET_ORDERS nested table column of ORDERS_ARCHIVE table. SELECT SET(SET_ORDERS) 4. As a Collection Comparison Conditional Operator: SET can also be used to compare Nested Table data for a unique elements check. It returns BOOLEAN output TRUE, if the Nested Table column contains a unique set of elements, otherwise it returns FALSE. Example Syntax: IS [NOT] A SET Example Usage: The SQL query below check whether SET_ORDERS column contains a unique set of elements. SELECT ORD_ID,ORD_DATE, ORD_NAME, LOCATION, Related Code Snippets:
![]() ![]() ![]() ![]() ![]() |
![]() |
Home | Search | Code Library | Sponsors | Privacy | Terms of Use | Contact Us | © 2003 - 2025 psoug.org |