DBZ-6599 Support single line statement without semicolon ending
This commit is contained in:
parent
0b0c5d85fc
commit
b8462e8fe0
@ -13,4 +13,4 @@ col10 clob,
|
||||
col11 "mdsys"."sdo_geometry",
|
||||
col12 number(1,0),
|
||||
col13 date not null,
|
||||
primary key (id));
|
||||
primary key (id));
|
@ -33,7 +33,7 @@ options {
|
||||
}
|
||||
|
||||
sql_script
|
||||
: ((unit_statement | sql_plus_command) SEMICOLON?)* EOF
|
||||
: sql_plus_command_no_semicolon? ((sql_plus_command | unit_statement) (SEMICOLON '/'? (sql_plus_command | unit_statement))* SEMICOLON? '/'?) EOF
|
||||
;
|
||||
|
||||
unit_statement
|
||||
@ -590,7 +590,6 @@ create_index
|
||||
: CREATE (UNIQUE | BITMAP)? INDEX index_name
|
||||
ON (cluster_index_clause | table_index_clause | bitmap_join_index_clause)
|
||||
UNUSABLE?
|
||||
';'?
|
||||
;
|
||||
|
||||
cluster_index_clause
|
||||
@ -715,7 +714,7 @@ indextype
|
||||
|
||||
//https://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1010.htm#SQLRF00805
|
||||
alter_index
|
||||
: ALTER INDEX index_name (alter_index_ops_set1 | alter_index_ops_set2) ';'
|
||||
: ALTER INDEX index_name (alter_index_ops_set1 | alter_index_ops_set2)
|
||||
;
|
||||
|
||||
alter_index_ops_set1
|
||||
@ -982,7 +981,6 @@ analyze
|
||||
| LIST CHAINED ROWS into_clause1?
|
||||
| DELETE SYSTEM? STATISTICS
|
||||
)
|
||||
';'
|
||||
;
|
||||
|
||||
partition_extention_clause
|
||||
@ -1819,7 +1817,6 @@ create_table
|
||||
: CREATE (GLOBAL TEMPORARY)? TABLE tableview_name
|
||||
(SHARING '=' (NONE | METADATA | DATA | EXTENDED DATA))?
|
||||
(relational_table | object_table | xmltype_table) (USAGE QUEUE)? (AS select_only_statement)?
|
||||
';'
|
||||
;
|
||||
|
||||
xmltype_table
|
||||
@ -2539,11 +2536,11 @@ upgrade_table_clause
|
||||
;
|
||||
|
||||
truncate_table
|
||||
: TRUNCATE TABLE tableview_name ((PRESERVE | PURGE) MATERIALIZED VIEW LOG)? ((DROP ALL?|REUSE) STORAGE)? CASCADE? SEMICOLON
|
||||
: TRUNCATE TABLE tableview_name ((PRESERVE | PURGE) MATERIALIZED VIEW LOG)? ((DROP ALL?|REUSE) STORAGE)? CASCADE?
|
||||
;
|
||||
|
||||
drop_table
|
||||
: DROP TABLE tableview_name (AS tableview_name)? (CASCADE CONSTRAINTS)? PURGE? (AS quoted_string)? FORCE? SEMICOLON
|
||||
: DROP TABLE tableview_name (AS tableview_name)? (CASCADE CONSTRAINTS)? PURGE? (AS quoted_string)? FORCE?
|
||||
;
|
||||
|
||||
drop_view
|
||||
@ -2903,7 +2900,6 @@ alter_table
|
||||
| move_table_clause
|
||||
)
|
||||
((enable_disable_clause | enable_or_disable (TABLE LOCK | ALL TRIGGERS) )+)?
|
||||
';'
|
||||
;
|
||||
|
||||
alter_table_properties
|
||||
@ -4672,9 +4668,11 @@ xmlserialize_param_ident_part
|
||||
|
||||
// SqlPlus
|
||||
|
||||
sql_plus_command_no_semicolon
|
||||
: set_command
|
||||
;
|
||||
sql_plus_command
|
||||
: '/'
|
||||
| EXIT
|
||||
: EXIT
|
||||
| PROMPT_MESSAGE
|
||||
| SHOW (ERR | ERRORS)
|
||||
| START_CMD
|
||||
|
@ -9,7 +9,7 @@ analyze table schema.table123 list chained rows into chained_rows;
|
||||
analyze table schema.table123 estimate statistics sample 5 percent;
|
||||
analyze table schema.table123 compute statistics for table;
|
||||
analyze table schema.table123 partition (partition_name) estimate statistics;
|
||||
analyze table schema.table123 subpartition sub(partition_name) estimate statistics;
|
||||
analyze table schema.table123 subpartition (partition_name) estimate statistics;
|
||||
-- Analyze Index
|
||||
analyze index schema.index123 estimate statistics;
|
||||
analyze index schema.index123 estimate statistics for all columns;
|
||||
|
@ -589,8 +589,12 @@ CREATE TABLE "ZZZ"."TASKVOLUME"
|
||||
-- Create index
|
||||
create index hr.name on hr.table (id,data) tablespace ts;
|
||||
create unique index idx_eshp_auction_file_history_id on eshp_auction_file_history(history_id);
|
||||
CREATE UNIQUE INDEX "IDENTITYDB"."IDX_CHANGENUMBERS_PK" ON "IDENTITYDB"."CHANGE_NUMBERS" ("CHANGE_NO", "EXPIRY_TIME") LOCAL (PARTITION "SYS_P44414" NOCOMPRESS ( SUBPARTITION "SYS_SUBP44398" , SUBPARTITION "SYS_SUBP44399" , SUBPARTITION "SYS_SUBP44400" , SUBPARTITION "SYS_SUBP44401" , SUBPARTITION "SYS_SUBP44403" , SUBPARTITION "SYS_SUBP44404" , SUBPARTITION "SYS_SUBP44405" , SUBPARTITION "SYS_SUBP44406" , SUBPARTITION "SYS_SUBP44407" , SUBPARTITION "SYS_SUBP44408" , SUBPARTITION "SYS_SUBP44409" , SUBPARTITION "SYS_SUBP44410" , SUBPARTITION "SYS_SUBP44411" , SUBPARTITION "SYS_SUBP44412" , SUBPARTITION "SYS_SUBP44413" ) )
|
||||
CREATE UNIQUE INDEX "IDENTITYDB"."IDX_CHANGENUMBERS_PK" ON "IDENTITYDB"."CHANGE_NUMBERS" ("CHANGE_NO", "EXPIRY_TIME") LOCAL (PARTITION "SYS_P44414" NOCOMPRESS ( SUBPARTITION "SYS_SUBP44398" , SUBPARTITION "SYS_SUBP44399" , SUBPARTITION "SYS_SUBP44400" , SUBPARTITION "SYS_SUBP44401" , SUBPARTITION "SYS_SUBP44403" , SUBPARTITION "SYS_SUBP44404" , SUBPARTITION "SYS_SUBP44405" , SUBPARTITION "SYS_SUBP44406" , SUBPARTITION "SYS_SUBP44407" , SUBPARTITION "SYS_SUBP44408" , SUBPARTITION "SYS_SUBP44409" , SUBPARTITION "SYS_SUBP44410" , SUBPARTITION "SYS_SUBP44411" , SUBPARTITION "SYS_SUBP44412" , SUBPARTITION "SYS_SUBP44413" ) );
|
||||
CREATE UNIQUE INDEX "ORACDC"."DEPARTMENT_PK" ON "ORACDC"."DEPARTMENT" ("REQUEST_ID", "EMP_NO");
|
||||
create TABLE BKP_cc AS (
|
||||
select * FROM ca.EBS_BALANCETE_CC f);
|
||||
-- WHERE
|
||||
-- TO_CHAR(to_date('20'||f.nr_ano,'YYYY'),'YYYY')||'/'||TRIM(TO_CHAR(f.nr_mes,'00')) = :refCompAcad);
|
||||
CREATE INDEX "SETTLEMENT"."TRADE_REQ_BASE_IDX6" ON "SETTLEMENT"."TRADE_REQ_BASE" ("UPDATED_AT") PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SETTLEMENT" PARALLEL 1;
|
||||
-- Comment statement
|
||||
COMMENT ON MATERIALIZED VIEW "MONITOR"."SQL_ALERT_LOG_ERRORS" IS 'snapshot table for snapshot MONITOR.SQL_ALERT_LOG_ERRORS';
|
||||
|
@ -0,0 +1,4 @@
|
||||
create TABLE BKP_cc AS (
|
||||
select * FROM ca.EBS_BALANCETE_CC f)
|
||||
-- WHERE
|
||||
-- TO_CHAR(to_date('20'||f.nr_ano,'YYYY'),'YYYY')||'/'||TRIM(TO_CHAR(f.nr_mes,'00')) = :refCompAcad);
|
Loading…
Reference in New Issue
Block a user