-
Notifications
You must be signed in to change notification settings - Fork 7
feature_03_derived_table
Tony Jang edited this page Oct 5, 2020
·
2 revisions
파생된 테이블과 관련된 기능입니다.
✔ = 지원하는 기능
❌ = 지원하지 않는 기능
⚠ = 지원 예정
Feature | MySql | PostgreSql | JSql | Oracle | SqlServer |
---|---|---|---|---|---|
Derived Table (w/ Alias) | ✔ | ✔ | ✔ | ✔ | ✔ |
Derived Table (w/o Alias) | ❌ | ❌ | ✔ | ✔ | ❌ |
SELECT * FROM (SELECT * FROM sample_table) AS alias
Database.Table = sample_db
.sample_table
Columns = sample_column1, sample_column2
-
IQsiDerivedTableNode
-
Columns
-
Source
-
IQsiDerivedTableNode
-
Columns
-
Source
-
IQsiDerivedTableNode
-
Columns
-
Source
-
IQsiTableAccessNode
-
Identifier
=sample_table
-
-
IQsiTableAccessNode
-
-
IQsiDerivedTableNode
-
Alias
-
IQsiAliasNode
-
Name
=alias
-
-
IQsiAliasNode
-
-
IQsiDerivedTableNode
-
-
sample_column1 (derived)
-
sample_column1 (derived: alias)
-
sample_column1 (table: sample_db.sample_table)
- Reference : sample_db.sample_table
-
sample_column1 (table: sample_db.sample_table)
-
sample_column1 (derived: alias)
-
sample_column2 (derived)
-
sample_column2 (derived: alias)
-
sample_column2 (table: sample_db.sample_table)
- Reference : sample_db.sample_table
-
sample_column2 (table: sample_db.sample_table)
-
sample_column2 (derived: alias)
위와 같은 쿼리 결과에서 SELECT 절 이후 SELECT * FROM sample_table
서브 쿼리를 DerivedTable로 처리해 결과를 추적합니다. 이때 해당 서브쿼리는 별칭이 적용되었으므로 alias
라는 별칭으로 추적됩니다.
SELECT * FROM (SELECT * FROM sample_table)
Database.Table = sample_db
.sample_table
Columns = sample_column1, sample_column2
-
IQsiDerivedTableNode
-
Columns
-
Source
-
IQsiDerivedTableNode
-
Columns
-
Source
-
IQsiTableAccessNode
-
Identifier
=SAMPLE_TABLE
-
-
IQsiTableAccessNode
-
-
IQsiDerivedTableNode
-
-
sample_column1 (derived)
-
sample_column1 (derived)
-
sample_column1 (table: sample_db.sample_table)
- Reference : sample_db.sample_table
-
sample_column1 (table: sample_db.sample_table)
-
sample_column1 (derived)
-
sample_column2 (derived)
-
sample_column2 (derived)
-
sample_column2 (table: sample_db.sample_table)
- Reference : sample_db.sample_table
-
sample_column2 (table: sample_db.sample_table)
-
sample_column2 (derived)
위와 같은 쿼리 결과에서 SELECT 절 이후 SELECT * FROM sample_table
서브 쿼리를 DerivedTable로 처리해 결과를 추적합니다.