@dbml/core 5.3.1 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,157 +1,261 @@
1
- # OracleSQL model structure generator
2
-
3
- This folder houses the implementation of the OracleSQL model structure generator based on the ANTLR4 parser.
4
-
5
- This file documents the current features and bugs of this model structure generator.
6
-
7
- In the below table, the following notation is used:
8
- - ✅: Supported.
9
- - 🤷🏼‍♂️: Invalid SQL in OracleSQL.
10
- - ❓: Valid SQL in OracleSQL, the generator can still generate output but it ignores this syntax.
11
- - ❌: Valid SQL in OracleSQL, but the generator fails to generate any output.
12
-
13
- | SQL syntax | OracleSQL |
14
- |-------------------------------|---------------|
15
- | 1. INSERT statement | |
16
- | 1.a. Basic INSERT ... VALUES | |
17
- | 1.b. INSERT ... SELECT | ❌ |
18
- | 1.c. Multi-row INSERT | 🤷🏼‍♂️ |
19
- | 1.d. Common table expression (WITH clause) | ❌ |
20
- | 1.e. Target table alias | ❌ |
21
- | 1.f. INSERT ... RETURNING/INSERT OUTPUT | ❓ |
22
- | 1.g. INSERT ... ON CONFLICT (UPSERT)/INSERT ... ON DUPLICATE KEY/INSERT … IGNORE | 🤷🏼‍♂️ |
23
- | 1.h. INSERT OVERWRITE | 🤷🏼‍♂️ |
24
- | 1.i. Multi-table INSERT | ❌ |
25
- | 1.j. Conditional multi-table INSERT (WHEN/FIRST/ALL) | ❌ |
26
- | 6. CREATE TABLE | |
27
- | 6.a. Basic syntax | ✅ |
28
- | 6.a.i. Enumerated data type | 🤷🏼‍♂️ (but supported in Oracle 23ai) |
29
- | 6.a.ii. Data type of the form name(...) | ✅ |
30
- | 6.a.iii. Data type of the form name\[...\] | 🤷🏼‍♂️ |
31
- | 6.b. PRIMARY KEY | |
32
- | 6.b.i. Inline PRIMARY KEY | ✅ |
33
- | 6.b.ii. Out-of-line PRIMARY KEY | ✅ |
34
- | 6.b.iii. Composite PRIMARY KEY | ✅ |
35
- | 6.b.iv. Named PRIMARY KEY | ✅ |
36
- | 6.b.v. Other options (deferrable, etc.) | (ignore the options) |
37
- | 6.c. FOREIGN KEY | |
38
- | 6.c.i. Inline FOREIGN KEY | ✅ |
39
- | 6.c.ii. Out-of-line FOREIGN KEY | ✅ |
40
- | 6.c.iii. Composite FOREIGN KEY | ✅ |
41
- | 6.c.iv. Named FOREIGN KEY | ✅ |
42
- | 6.c.v. ON UPDATE | 🤷🏼‍♂️ |
43
- | 6.c.vi. ON DELETE | ✅ |
44
- | 6.c.vii. Other options (deferrable, etc.) | ❓ |
45
- | 6.d. UNIQUE | |
46
- | 6.d.i. Inline UNIQUE | ✅ |
47
- | 6.d.ii. Out-of-line UNIQUE | |
48
- | 6.d.iii. Composite UNIQUE | ✅ |
49
- | 6.d.iv. Named UNIQUE | |
50
- | 6.d.v. Other options (deferrable, etc) | ❓ |
51
- | 6.d.vi. NULLS NOT DISTINCT | |
52
- | 6.d.vii. UNIQUE KEY/UNIQUE INDEX | 🤷🏼‍♂️ |
53
- | 6.e. CHECK | |
54
- | 6.e.i. Inline CHECK | |
55
- | 6.e.ii. Out-of-line CHECK | |
56
- | 6.e.iii. Named CHECK | ✅ |
57
- | 6.e.iv. Other options (enforcement control, etc.) | ❓ |
58
- | 6.f. DEFAULT values | |
59
- | 6.f.i. Inline DEFAULT | ✅ |
60
- | 6.f.ii. Out-of-line DEFAULT | 🤷🏼‍♂️ |
61
- | 6.f.iii. Functional DEFAULT | |
62
- | 6.f.iv. Named DEFAULT | 🤷🏼‍♂️ |
63
- | 6.g. NULL | |
64
- | 6.h. NOT NULL | |
65
- | 6.h.i. Inline NOT NULL | |
66
- | 6.h.ii. Out-of-line NOT NULL | 🤷🏼‍♂️ |
67
- | 6.h.iii. Named NOT NULL | 🤷🏼‍♂️ |
68
- | 6.h.iv. Other options (deferrable, etc.) | ❓ |
69
- | 6.i. Indexes | |
70
- | 6.i.i. Inline indexes | 🤷🏼‍♂️ |
71
- | 6.i.ii. Out-of-line indexes | |
72
- | 6.i.iii. Named indexes | ✅ |
73
- | 6.i.iv. Multi-column indexes | |
74
- | 6.i.v. CLUSTERED/NONCLUSTERED | 🤷🏼‍♂️ |
75
- | 6.i.vi. FULLTEXT | 🤷🏼‍♂️ |
76
- | 6.i.vii. SPATIAL | 🤷🏼‍♂️ |
77
- | 6.i.viii. Other options | |
78
- | 6.i.ix. USING HASH/BTREE | 🤷🏼‍♂️ |
79
- | 6.j. Auto-increment | |
80
- | 6.j.i. AUTO_INCREMENT | 🤷🏼‍♂️ |
81
- | 6.j.ii. SERIAL/BIG SERIAL | 🤷🏼‍♂️ |
82
- | 6.j.iii. IDENTITY | 🤷🏼‍♂️ |
83
- | 6.j.iv. Increment range | |
84
- | 6.j.v. GENERATED ... AS IDENTITY | ✅ |
85
- | 6.k. Computed column | |
86
- | 6.l. TEMPORARY tables | (No indication of temporary table) |
87
- | 6.m. CREATE TABLE AS SELECT (CTAS) | ❌ |
88
- | 6.n. Comments | |
89
- | 6.n.i. Table comments | |
90
- | 6.n.ii. Column comments | |
91
- | 6.o. Other options (inheritance, UNLOGGED, partition, collate, etc.) | |
92
- | 7. ALTER TABLE | |
93
- | 7.a. ADD COLUMN | |
94
- | 7.a.i. Type | ❌ |
95
- | 7.a.ii. DEFAULT | |
96
- | 7.a.iii. NOT NULL | ❌ |
97
- | 7.a.iv. NULL | |
98
- | 7.a.v. CHECK | |
99
- | 7.a.vi. UNIQUE | |
100
- | 7.a.vii. FOREIGN KEY | |
101
- | 7.a.viii. PRIMARY KEY | ❌ |
102
- | 7.a.ix. AUTOINCREMENT/SERIAL/BIGSERIAL/IDENTITY/GENERATED AS IDENTITY | ❌ |
103
- | 7.a.x. Computed column | ❌ |
104
- | 7.b. DROP COLUMN | |
105
- | 7.c. ALTER COLUMN / MODIFY COLUMN | |
106
- | 7.c.i. COMMENT | 🤷🏼‍♂️ |
107
- | 7.c.ii. Others | |
108
- | 7.d. RENAME COLUMN | |
109
- | 7.e. ADD CONSTRAINT | |
110
- | 7.e.i. DEFAULT | ✅ |
111
- | 7.e.ii. NOT NULL | ✅ |
112
- | 7.e.iii. NULL | ✅ |
113
- | 7.e.iv. named CHECK | |
114
- | 7.e.v. unnamed CHECK | ✅ |
115
- | 7.e.vi. named UNIQUE | |
116
- | 7.e.vii. unnamed UNIQUE | |
117
- | 7.e.viii. named PRIMARY KEY | |
118
- | 7.e.ix. unnamed PRIMARY KEY | |
119
- | 7.e.x. named FOREIGN KEY | ✅ |
120
- | 7.e.xi. unnamed FOREIGN KEY | ✅ |
121
- | 7.g. DROP CONSTRAINT | ❌ |
122
- | 7.h. ALTER CONSTRAINT | |
123
- | 7.i. RENAME TABLE | ❌ |
124
- | 7.j. SET SCHEMA | |
125
- | 7.k. ALTER INDEX | 🤷🏼‍♂️ |
126
- | 7.l. DROP INDEX | 🤷🏼‍♂️ |
127
- | 7.m. SET COMMENT/COMMENT = | 🤷🏼‍♂️ |
128
- | 7.n. ADD INDEX | 🤷🏼‍♂️ |
129
- | 8. DROP TABLE | |
130
- | 8.a. Basic syntax | |
131
- | 9. CREATE INDEX | |
132
- | 9.a. Basic syntax | ✅ |
133
- | 9.b. Composite index | ✅ |
134
- | 9.c. Named index | ✅ |
135
- | 9.d. UNIQUE index | |
136
- | 9.e. Partial/Filtered index | ❓ (ignore) |
137
- | 9.f. BTREE/HASH/GIST/BRIN/… index | 🤷🏼‍♂️ |
138
- | 9.g. INCLUDE columns | 🤷🏼‍♂️ |
139
- | 9.h. CLUSTERED/NONCLUSTERED | 🤷🏼‍♂️ |
140
- | 9.i. Functional index | |
141
- | 9.j. FULLTEXT/SPATIAL index | 🤷🏼‍♂️ |
142
- | 9.k. COLLATE | |
143
- | 9.l. COMMENT | ❓ |
144
- | 9.m. NULLS LAST/FIRST | 🤷🏼‍♂️ |
145
- | 9.n. ASC/DESC | ❓ |
146
- | 10. DROP INDEX | |
147
- | 10.a. Basic syntax | ❌ |
148
- | 11. ALTER INDEX | |
149
- | 11.a. RENAME | |
150
- | 11.b. ALTER COLUMN | 🤷🏼‍♂️ |
151
- | 12. CREATE VIEW | |
152
- | 12.a. Basic syntax | ❌ |
153
- | 13. Comment | |
154
- | 13.a. Table comments | ✅ |
155
- | 13.b. Column comments | |
156
- | 13.c. COMMENT … IS NULL | ✅ |
157
- | 13.d. Index comments | |
1
+ # Oracle SQL Parser Support
2
+
3
+ > Comprehensive documentation for the Oracle SQL model structure generator based on the ANTLR4 parser.
4
+
5
+ ## Overview
6
+
7
+ This module provides SQL parsing capabilities for Oracle databases, enabling conversion of Oracle DDL statements to DBML format. The parser supports Oracle-specific syntax including `GENERATED AS IDENTITY` columns, function-based indexes, and comprehensive `ALTER TABLE ADD CONSTRAINT` operations. Oracle has the best `ALTER TABLE` support among all supported databases.
8
+
9
+ ## Support Legend
10
+
11
+ | Symbol | Meaning |
12
+ |--------|---------|
13
+ | | Fully supported and correctly parsed |
14
+ | ◐ | Valid SQL that is parsed, but some options/clauses are ignored |
15
+ | | Valid Oracle syntax, but the parser fails to generate output |
16
+ | | Syntax not valid in Oracle |
17
+
18
+ ## Key Capabilities
19
+
20
+ - **Data Definition**
21
+ - `CREATE TABLE` with full syntax support
22
+ - Data types: parameterized types (e.g., `VARCHAR2(255)`, `NUMBER(10,2)`)
23
+ - **Constraints**
24
+ - `PRIMARY KEY` (column-level, table-level, multi-column, with explicit name)
25
+ - `FOREIGN KEY` with `ON DELETE` actions (`ON UPDATE` not supported by Oracle)
26
+ - `UNIQUE`, `CHECK`, `DEFAULT`, `NOT NULL`
27
+ - **Auto-increment**
28
+ - `GENERATED AS IDENTITY`
29
+ - `GENERATED ALWAYS` / `GENERATED BY DEFAULT` AS IDENTITY
30
+ - **Indexes**
31
+ - `CREATE INDEX` (basic, multi-column, unique)
32
+ - Function-based indexes (e.g., `UPPER(column)`)
33
+ - **Comments**
34
+ - `COMMENT ON TABLE` / `COMMENT ON COLUMN` statements
35
+ - **Schema Modification**
36
+ - `ALTER TABLE ADD CONSTRAINT` (best support among all DBMS)
37
+ - Supports: `DEFAULT`, `NOT NULL`, `CHECK`, `UNIQUE`, `PRIMARY KEY`, `FOREIGN KEY`
38
+ - **Data Manipulation**
39
+ - Basic `INSERT` only (Oracle uses `INSERT ALL` for multi-row)
40
+
41
+ ---
42
+
43
+ ## Feature Support Matrix
44
+
45
+ ### `CREATE TABLE`
46
+
47
+ | Feature | Status | Notes |
48
+ |---------|---------|-------|
49
+ | Basic `CREATE TABLE` syntax | | |
50
+ | Enumerated data types | — | Not supported in Oracle (supported in Oracle 23ai) |
51
+ | Parameterized types `name(...)` | | e.g., `VARCHAR2(255)`, `NUMBER(10,2)` |
52
+ | Array types `name[...]` | | Oracle uses VARRAY differently |
53
+ | TEMPORARY tables || Parsed but no indication of temporary status |
54
+ | `CREATE TABLE` AS SELECT | | |
55
+ | Table options (TABLESPACE, etc.) | | Options are ignored |
56
+
57
+ ### Constraints
58
+
59
+ #### `PRIMARY KEY`
60
+
61
+ | Feature | Status | Notes |
62
+ |---------|---------|-------|
63
+ | Column-level `PRIMARY KEY` | | Defined with column: `id NUMBER PRIMARY KEY` |
64
+ | Table-level `PRIMARY KEY` || Defined separately: `PRIMARY KEY (id)` |
65
+ | Multi-column `PRIMARY KEY` | | Multiple columns: `PRIMARY KEY (a, b)` |
66
+ | Explicitly named (CONSTRAINT name) | | `CONSTRAINT pk_name PRIMARY KEY (id)` |
67
+ | DEFERRABLE / NOT DEFERRABLE | | Constraint timing options are ignored |
68
+
69
+ #### `FOREIGN KEY`
70
+
71
+ | Feature | Status | Notes |
72
+ |---------|---------|-------|
73
+ | Column-level `FOREIGN KEY` | | `col NUMBER REFERENCES other(id)` |
74
+ | Table-level `FOREIGN KEY` | | `FOREIGN KEY (col) REFERENCES other(id)` |
75
+ | Multi-column `FOREIGN KEY` | | `FOREIGN KEY (a, b) REFERENCES other(x, y)` |
76
+ | Explicitly named (CONSTRAINT name) | | `CONSTRAINT fk_name FOREIGN KEY ...` |
77
+ | `ON UPDATE` action | | Oracle does not support `ON UPDATE` |
78
+ | `ON DELETE` action | | CASCADE, SET NULL, NO ACTION |
79
+ | DEFERRABLE / NOT DEFERRABLE || Constraint timing options are ignored |
80
+
81
+ #### `UNIQUE`
82
+
83
+ | Feature | Status | Notes |
84
+ |---------|---------|-------|
85
+ | Column-level `UNIQUE` | | `col NUMBER UNIQUE` |
86
+ | Table-level `UNIQUE` | | `UNIQUE (col)` |
87
+ | Multi-column `UNIQUE` | | `UNIQUE (a, b)` |
88
+ | Explicitly named (CONSTRAINT name) || `CONSTRAINT uq_name UNIQUE (col)` |
89
+ | DEFERRABLE / NOT DEFERRABLE | | Constraint timing options are ignored |
90
+ | NULLS NOT DISTINCT | | Treats NULLs as equal - option is ignored |
91
+ | `UNIQUE KEY`/`UNIQUE INDEX` | | MySQL syntax; use `CREATE INDEX` |
92
+
93
+ #### `CHECK`
94
+
95
+ | Feature | Status | Notes |
96
+ |---------|---------|-------|
97
+ | Column-level `CHECK` | | `col NUMBER CHECK (col > 0)` |
98
+ | Table-level `CHECK` | | `CHECK (col > 0)` |
99
+ | Explicitly named (CONSTRAINT name) | | `CONSTRAINT chk_name CHECK (col > 0)` |
100
+ | ENABLE / DISABLE options | | Enforcement options are ignored |
101
+
102
+ #### `DEFAULT`
103
+
104
+ | Feature | Status | Notes |
105
+ |---------|---------|-------|
106
+ | Column-level `DEFAULT` | | `col NUMBER DEFAULT 0` |
107
+ | Table-level `DEFAULT` | | Oracle only supports column-level `DEFAULT` |
108
+ | Function as `DEFAULT` | | `DEFAULT SYSDATE`, `DEFAULT SYS_GUID()` |
109
+ | Explicitly named `DEFAULT` || Oracle doesn't support named `DEFAULT` constraints |
110
+
111
+ #### `NOT NULL` / NULL
112
+
113
+ | Feature | Status | Notes |
114
+ |---------|---------|-------|
115
+ | Column-level `NOT NULL` | | `col NUMBER NOT NULL` |
116
+ | NULL (explicitly nullable) | | `col NUMBER NULL` |
117
+ | Table-level `NOT NULL` | | Oracle only supports column-level `NOT NULL` |
118
+ | DEFERRABLE / NOT DEFERRABLE | | Constraint timing options are ignored |
119
+
120
+ ### Auto-Increment Columns
121
+
122
+ | Feature | Status | Notes |
123
+ |---------|---------|-------|
124
+ | `GENERATED AS IDENTITY` (column property) | | `id NUMBER GENERATED AS IDENTITY` |
125
+ | `GENERATED ALWAYS AS IDENTITY` (column property) | | Database always generates value |
126
+ | `GENERATED BY DEFAULT AS IDENTITY` (column property) | | Database generates if no value provided |
127
+ | START WITH / INCREMENT BY | | Sequence options are ignored |
128
+ | `AUTO_INCREMENT` (column attribute) | | MySQL syntax - not valid in Oracle |
129
+ | `SERIAL` (pseudo-type) || PostgreSQL syntax - not valid in Oracle |
130
+ | `BIGSERIAL` (pseudo-type) | | PostgreSQL syntax - not valid in Oracle |
131
+ | `IDENTITY(seed, increment)` (column property) || SQL Server/Snowflake syntax - not valid in Oracle |
132
+
133
+ ### Inline Indexes (in `CREATE TABLE`)
134
+
135
+ | Feature | Status | Notes |
136
+ |---------|---------|-------|
137
+ | Column-level indexes | | Oracle uses separate `CREATE INDEX` statement |
138
+ | Table-level indexes | | Via constraint definitions |
139
+ | Named indexes | | Index name specified with constraint |
140
+ | Multi-column indexes | | Multiple columns in constraint |
141
+ | CLUSTERED/NONCLUSTERED | | SQL Server syntax - not valid in Oracle |
142
+ | Index options | | Options are ignored |
143
+
144
+ ### Table/Column Comments (in `CREATE TABLE`)
145
+
146
+ | Feature | Status | Notes |
147
+ |---------|---------|-------|
148
+ | Table comments || Via `COMMENT ON TABLE` statement |
149
+ | Column comments | | Via `COMMENT ON COLUMN` statement |
150
+
151
+ ---
152
+
153
+ ### `CREATE INDEX`
154
+
155
+ | Feature | Status | Notes |
156
+ |---------|---------|-------|
157
+ | Basic `CREATE INDEX` | | `CREATE INDEX idx ON table (col)` |
158
+ | Multi-column index | ✓ | `CREATE INDEX idx ON table (a, b)` |
159
+ | Explicitly named index | ✓ | Index name is required in Oracle |
160
+ | `UNIQUE` index | ✓ | `CREATE UNIQUE INDEX idx ON table (col)` |
161
+ | Function-based index | ✓ | `CREATE INDEX ON t (UPPER(col))` |
162
+ | Partial/Filtered index (WHERE clause) | ◐ | WHERE condition is ignored |
163
+ | BITMAP index | — | Parsed but type not captured |
164
+ | BTREE/HASH/GIST/BRIN/GIN | — | PostgreSQL syntax - not applicable to Oracle |
165
+ | INCLUDE columns | — | Not supported in Oracle |
166
+ | CLUSTERED/NONCLUSTERED | — | SQL Server syntax - not valid in Oracle |
167
+ | COLLATE | ◐ | Collation settings are ignored |
168
+ | Index comments | ◐ | Comments are ignored |
169
+ | NULLS FIRST/LAST | — | Oracle uses different syntax |
170
+ | ASC/DESC | ◐ | Sort direction is ignored |
171
+ | FULLTEXT/SPATIAL | — | Oracle uses different syntax (Oracle Text, Spatial) |
172
+
173
+ ---
174
+
175
+ ### `INSERT` Statements
176
+
177
+ | Feature | Status | Notes |
178
+ |---------|---------|-------|
179
+ | Basic `INSERT` ... VALUES | ✓ | `INSERT INTO t (col) VALUES (1)` |
180
+ | Multi-row `INSERT` | — | Oracle uses `INSERT ALL` syntax |
181
+ | `INSERT` ... SELECT | ✗ | Subquery as data source |
182
+ | WITH clause (CTE) | ✗ | CTE before `INSERT` |
183
+ | Target table alias | ✗ | `INSERT INTO t alias ...` |
184
+ | `INSERT` ... RETURNING | ◐ | Returns inserted rows - clause is ignored |
185
+ | `INSERT ALL` (multi-table insert) | ✗ | Oracle-specific multi-table insert |
186
+ | Conditional `INSERT` (WHEN/FIRST/ALL) | ✗ | Oracle syntax for conditional inserts |
187
+ | `INSERT` OVERWRITE | — | Snowflake/Hive syntax - not valid in Oracle |
188
+
189
+ ---
190
+
191
+ ### `ALTER TABLE`
192
+
193
+ | Feature | Status | Notes |
194
+ |---------|---------|-------|
195
+ | **ADD COLUMN** | | |
196
+ | - All column properties | ✗ | |
197
+ | **DROP COLUMN** | ✗ | |
198
+ | **ALTER COLUMN / MODIFY** | | |
199
+ | - `COMMENT` | — | Use `COMMENT ON` statement |
200
+ | - Other modifications | ✗ | |
201
+ | **RENAME COLUMN** | ✗ | |
202
+ | **ADD CONSTRAINT** | | |
203
+ | - Named `DEFAULT` | ✓ | Best among all DBMS |
204
+ | - Named `NOT NULL` | ✓ | Best among all DBMS |
205
+ | - NULL | ✓ | |
206
+ | - Named `CHECK` | ✓ | |
207
+ | - Unnamed `CHECK` | ✓ | |
208
+ | - Named `UNIQUE` | ✓ | |
209
+ | - Unnamed `UNIQUE` | ✓ | |
210
+ | - Named `PRIMARY KEY` | ✓ | |
211
+ | - Unnamed `PRIMARY KEY` | ✓ | |
212
+ | - Named `FOREIGN KEY` | ✓ | |
213
+ | - Unnamed `FOREIGN KEY` | ✓ | |
214
+ | **DROP CONSTRAINT** | ✗ | |
215
+ | **ALTER CONSTRAINT** | ✗ | |
216
+ | **RENAME TABLE** | ✗ | |
217
+ | **SET SCHEMA** | ✗ | |
218
+
219
+ ---
220
+
221
+ ### Other DDL Statements
222
+
223
+ | Feature | Status | Notes |
224
+ |---------|---------|-------|
225
+ | `DROP TABLE` | ✗ | |
226
+ | `DROP INDEX` | ✗ | |
227
+ | `ALTER INDEX` | ✗ | |
228
+ | `CREATE VIEW` | ✗ | |
229
+
230
+ ---
231
+
232
+ ### Comments (`COMMENT ON`)
233
+
234
+ | Feature | Status | Notes |
235
+ |---------|---------|-------|
236
+ | `COMMENT ON TABLE` | ✓ | |
237
+ | `COMMENT ON COLUMN` | ✓ | |
238
+ | COMMENT ... IS NULL | ✓ | Removes comment |
239
+ | `COMMENT ON INDEX` | ✗ | |
240
+
241
+ ---
242
+
243
+ ## Known Limitations
244
+
245
+ - **`ON UPDATE` for `FOREIGN KEY`**: Oracle does not support `ON UPDATE` actions for foreign keys; only `ON DELETE` is available
246
+ - **Multi-row `INSERT`**: Oracle uses `INSERT ALL` syntax which is not currently supported
247
+ - **DDL modification statements**: `DROP TABLE`, `DROP INDEX`, `ALTER INDEX` not supported
248
+ - **`INSERT` ... SELECT**: Subqueries in `INSERT` statements not supported
249
+ - **`CREATE VIEW`**: View definitions are not parsed
250
+ - **Enumerated Types**: Not supported in Oracle (introduced in Oracle 23ai)
251
+ - **Increment options for `IDENTITY`**: START WITH, INCREMENT BY options are parsed but ignored
252
+
253
+ ## Oracle-Specific Notes
254
+
255
+ 1. **`GENERATED AS IDENTITY`**: Oracle fully supports the SQL standard `GENERATED AS IDENTITY` syntax. Both `GENERATED ALWAYS` and `GENERATED BY DEFAULT` variants are supported
256
+ 2. **`ALTER TABLE ADD CONSTRAINT`**: Oracle has the most comprehensive `ALTER TABLE ADD CONSTRAINT` support, including `DEFAULT`, `NOT NULL`, `CHECK`, `UNIQUE`, `PRIMARY KEY`, and `FOREIGN KEY` - all fully functional
257
+ 3. **Function-based Indexes**: Oracle's function-based indexes (e.g., `CREATE INDEX ON t (UPPER(col))`) are fully supported
258
+ 4. **`ON DELETE` Only**: Oracle foreign keys only support `ON DELETE` actions (`CASCADE`, `SET NULL`, `NO ACTION`). There is no `ON UPDATE` support
259
+ 5. **Comments**: Use `COMMENT ON TABLE/COLUMN` statements. These are separate DDL statements, not inline with `CREATE TABLE`
260
+ 6. **No Multi-row `INSERT`**: Oracle uses `INSERT ALL ... SELECT` syntax for multi-row inserts, which differs from other databases
261
+ 7. **`VARCHAR2`**: Oracle uses `VARCHAR2` (not `VARCHAR`) as the standard variable-length string type