Rules for Using Wildcards for Source Objects
For source objects, you can use the asterisk alone or with a partial name. For example, the following source specifications are valid:
-
TABLE HQ.*; -
TABLE PDB*.HQ.*; -
MAP HQ.T_*; -
MAP HQ.T_*, TARGET HQ.*;
The TABLE, MAP and SEQUENCE parameters take the case-sensitivity and locale of the database into account for wildcard resolution. For databases that are created as case-sensitive or case-insensitive, the wildcard matches the exact name and case. For example, if the database is case-sensitive, SCHEMA.TABLE is matched to SCHEMA.TABLE, Schema.Table is matched to Schema.Table, and so forth. If the database is case-insensitive, the matching is not case-sensitive.
For databases that can have both case-sensitive and case-insensitive object names in the same database instance, with the use of quote marks to enforce case-sensitivity, the wildcarding works differently. When used alone for a source name in a TABLE statement, an asterisk wildcard matches any character, whether or not the asterisk is within quotes. The following statements produce the same results:
TABLE hr.*; TABLE hr."*";
Similarly, a question mark wildcard used alone matches any single character, whether or not it is within quotes. The following produce the same results:
TABLE hr.?; TABLE hr."?";
If a question mark or asterisk wildcard is used with other characters, case-sensitivity is applied to the non-wildcard characters, but the wildcard matches both case-sensitive and case-insensitive names.
-
The following
TABLEstatements capture any table name that begins with lower-caseabc. The quoted name case is preserved and a case-sensitive match is applied. It captures table names that include"abcA"and"abca"because the wildcard matches both case-sensitive and case-insensitive characters.TABLE hr."abc*"; TABLE hr."abc?";
-
The following
TABLEstatements capture any table name that begins with upper-caseABC, because the partial name is case-insensitive (no quotes) and is stored in upper case by this database. However, because the wildcard matches both case-sensitive and case-insensitive characters, this example captures table names that includeABCAand"ABCa".TABLE hr.abc*; TABLE hr.abc?;