alter session set nls_sort=german_ai
Statement processed.
alter session set nls_comp=linguistic
Statement processed.
ALTER SESSION SET DEFAULT_COLLATION=german_ai
Statement processed.
drop table t_object
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
create table t_object (name varchar2(12))
Table created.
INSERT INTO "T_OBJECT" (NAME) VALUES ('_A')
1 row(s) inserted.
INSERT INTO "T_OBJECT" (NAME) VALUES ('_Ä')
1 row(s) inserted.
INSERT INTO "T_OBJECT" (NAME) VALUES ('A')
1 row(s) inserted.
INSERT INTO "T_OBJECT" (NAME) VALUES ('_B')
1 row(s) inserted.
INSERT INTO "T_OBJECT" (NAME) VALUES ('_')
1 row(s) inserted.
INSERT INTO "T_OBJECT" (NAME) VALUES ('\A')
1 row(s) inserted.
INSERT INTO "T_OBJECT" (NAME) VALUES ('.A')
1 row(s) inserted.
commit
Statement processed.
select * from t_object where name like '\_' escape '\'
NAME | _ |
---|
select * from t_object where name like '_'
NAME | A | _ |
---|
select * from t_object where name like '\_%' escape '\'
NAME | \A |
---|
select * from t_object where name like ('\_%' COLLATE GERMAN_AI ) escape '\'
NAME | _A | _Ä | _B | _ |
---|
select * from t_object where (name COLLATE GERMAN_AI ) like '\_%' escape '\'
NAME | _A | _Ä | _B | _ |
---|
select * from t_object where name like '\_A' escape '\'
NAME | _A | _Ä |
---|
explain plan for select * from t_object where name like '\_%' escape '\'
Statement processed.
select * from table(dbms_xplan.display)
PLAN_TABLE_OUTPUT | Plan hash value: 3775084319 | ------------------------------------------------------------------------------ | | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | | ------------------------------------------------------------------------------ | | 0 | SELECT STATEMENT | | 4 | 32 | 3 (0)| 00:00:01 | | |* 1 | TABLE ACCESS FULL| T_OBJECT | 4 | 32 | 3 (0)| 00:00:01 | | ------------------------------------------------------------------------------ | Predicate Information (identified by operation id): | --------------------------------------------------- | 1 - filter("NAME" LIKE '\_%' ESCAPE ) |
---|