Skip to content

Commit

Permalink
Support modifying an Oracle column's visibility with alter table
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Jul 17, 2023
1 parent d6353f2 commit 59190a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sql/plsql/PlSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -4909,7 +4909,9 @@ drop_column_clause

modify_column_clauses
: MODIFY ('(' modify_col_properties (',' modify_col_properties)* ')'
|'(' modify_col_visibility (',' modify_col_visibility)* ')'
| modify_col_properties
| modify_col_visibility
| modify_col_substitutable
)
;
Expand All @@ -4918,6 +4920,10 @@ modify_col_properties
: column_name datatype? (DEFAULT expression)? (ENCRYPT encryption_spec | DECRYPT)? inline_constraint* lob_storage_clause? //TODO alter_xmlschema_clause
;

modify_col_visibility
: column_name (VISIBLE | INVISIBLE)
;

modify_col_substitutable
: COLUMN column_name NOT? SUBSTITUTABLE AT ALL LEVELS FORCE?
;
Expand Down
5 changes: 5 additions & 0 deletions sql/plsql/examples/alter_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,8 @@ ALTER TABLE employees NO MEMOPTIMIZE FOR WRITE
ENABLE VALIDATE CONSTRAINT emp_manager_fk
EXCEPTIONS INTO exceptions;

ALTER TABLE employees
MODIFY LAST_UPDATE_DATE invisible;

ALTER TABLE employees
MODIFY LAST_UPDATE_DATE visible;

0 comments on commit 59190a5

Please sign in to comment.