FROM clause
Description
Grammar Syntax
FROM table_reference [, ...]
<table_reference> ::=
with_subquery_table_name [ table_alias ]
table_name [ * ] [ table_alias ]
( subquery ) [ table_alias ]
table_reference [ NATURAL ] join_type table_reference
[ ON join_condition | USING ( join_column [, ...] ) ]
table_reference PIVOT (
aggregate(expr) [ [ AS ] aggregate_alias ]
FOR column_name IN ( expression [ AS ] in_alias [, ...] )
) [ table_alias ]
table_reference UNPIVOT [ INCLUDE NULLS | EXCLUDE NULLS ] (
value_column_name
FOR name_column_name IN ( column_reference [ [ AS ]
in_alias ] [, ...] )
) [ table_alias ]
UNPIVOT expression AS value_alias [ AT attribute_alias ]Sample Source Patterns
Join types
Input Code:
EMPLOYEE_NAME
DEPARTMENT_NAME
EMPLOYEE_NAME
DEPARTMENT_NAME
DEPARTMENT_NAME
MANAGER_NAME
EMPLOYEE_NAME
DEPARTMENT_NAME
Output Code:
EMPLOYEE_NAME
DEPARTMENT_NAME
EMPLOYEE_NAME
DEPARTMENT_NAME
DEPARTMENT_NAME
MANAGER_NAME
EMPLOYEE_NAME
DEPARTMENT_NAME
Pivot Clause
Input Code:
MANAGER_ID
'HR'
'Sales'
'Engineering'
'Marketing'
Output Code:
MANAGER_ID
'HR'
'Sales'
'Engineering'
'Marketing'
Unpivot Clause
Input Code:
COLOR
CNT
Output Code:
COLOR
CNT
Related EWIs
Last updated
