SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
Figure 5 SQL/MX System Security Schema
Understanding ANSI External and Internal Names
ANSI SQL objects have both external and internal names. When objects are created in NonStop
SQL/MX, they are given external names. However, when the same objects are stored in the
metadata, they are stored by their internal name. You need to be aware of external and internal
naming when performing metadata queries.
When you use an object name in a search condition, such as a comparison predicate, use the
internal name. When you use the name as part of the table in a table-ref clause (for example,
the FROM clause), use the external name.
Regular Identifiers and Object Naming
If the object name is a regular identifier, the external name is not case sensitive. However, the
internal name is always stored in uppercase:
Internal NameExternal NameExample
MYTABLEmytableCREATE TABLE mytable . . .
Delimited Identifiers and Object Naming
If the object name is a delimited identifier, the external name is enclosed in double quotes and
any double quotes found inside the name are doubled. The internal name is the same name (case
intact), but the surrounding double quotes are removed, and the doubled up double quotes are
replaced with only one double quote:
Internal NameExternal NameExample
My "Delimited""MyCREATE TABLE "My
Table""Delimited""""Delimited"" Table" ...
Table"
This query uses internal and external names:
>> select substring (object_name, 1, 15) as TABLENAME,
case object_security_class
when 'UM' then 'USER METADATA TABLE'
when 'UT' then 'USER-DEFINED TABLE'
when 'SM' then 'SYSTEM METADATA TABLE'
when 'MU' then 'OTHER'
end as SECURITY_CLASS,
create_time,
object_owner as owner
from "my "" catalog".definition_schema_version_3000.objects
where object_type = 'BT'and schema_uid =
Understanding ANSI External and Internal Names 111










