Class DB2Alias {Analysis} derived from: Table

Documentation
SQL Reference for Cross-Platform Development - v1.1
http://www7b.software.ibm.com/dmdd/library/techarticle/0206sqlref/0206sqlref.html

Aliases (Chapter 1. Concepts 9)

An alias is an alternate name for a table or view. An alias can be used to reference a table or view in cases where an existing table or view can be referenced. However, the option of referencing a table or view by an alias is not explicitly shown in the syntax diagrams or mentioned in the description of SQL statements.

Like tables and views, an alias may be created, dropped, and have a comment associated with it. No authority is necessary to use an alias. Access to the tables and views that are referred to by the alias, however, still requires the appropriate authorization for the current statement.

An alias is created with the CREATE ALIAS statement. For more information about creating aliases, see " CREATE ALIAS" on page 318.

CREATE ALIAS
The CREATE ALIAS statement defines an alias for a table or view.

Invocation: This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared.

Authorization: The privileges held by the authorization ID of the statement must include at least one of the following:
- The privilege to create in the schema
- Administrative authority.
Syntax: CREATE ALIAS alias-name FOR table-name view-name

Description alias-name
Names the alias. The name, including the implicit or explicit qualifier, must not be the same as an index, table, view or alias that already exists at the current server. If the alias-name is qualified, the schema name must not be a system schema.

FOR table-name or view-name
Identifies the table or view at the current server for which alias-name is defined. An alias name must not be specified (an alias cannot refer to another alias). An alias can be defined for an object that does not exist at the time of the definition. If it does not exist when the alias is created, a warning is returned. However, the referenced object must exist when a SQL statement containing the alias is used, otherwise an error is returned.

Example: Create an alias named CURRENT_PROJECTS for the PROJECT table.
CREATE ALIAS CURRENT_PROJECTS FOR PROJECT


Parent PackageDB2ModelAbstractNo
Export ControlPublicAccessLink Class forNone
Class KindNormalClassCardinalityn
Space ConcurrencySequential
PersistenceNo  


Operations
NameSignatureClass
addEAnnotationEAnnotation addEAnnotation (String source)SQLObject
addEAnnotationDetailvoid addEAnnotationDetail (EAnnotation eAnnotation, String key, String value)SQLObject
getEAnnotationDetailString getEAnnotationDetail (EAnnotation eAnnotation, String key)SQLObject
setAnnotationDetailvoid setAnnotationDetail (EAnnotation eAnnotation, String key, String value)SQLObject
removeEAnnotationDetailvoid removeEAnnotationDetail (EAnnotation eAnnotation, String key)SQLObject
getEAnnotationEAnnotation getEAnnotation (String source)SQLObject
getEAnnotationEAnnotation getEAnnotation (String source)EModelElement
eClassEClass eClass ()EObject
eIsProxyboolean eIsProxy ()EObject
eResourceEResource eResource ()EObject
eContainerEObject eContainer ()EObject
eContainingFeatureEStructuralFeature eContainingFeature ()EObject
eContainmentFeatureEReference eContainmentFeature ()EObject
eContentsEEList eContents ()EObject
eAllContentsETreeIterator eAllContents ()EObject
eCrossReferencesEEList eCrossReferences ()EObject
eGetEJavaObject eGet (EStructuralFeature feature)EObject
eGetEJavaObject eGet (EStructuralFeature feature, boolean resolve)EObject
eSet eSet (EStructuralFeature feature, EJavaObject newValue)EObject
eIsSetboolean eIsSet (EStructuralFeature feature)EObject
eUnset eUnset (EStructuralFeature feature)EObject


Attributes
NameClassTypeInitial Value
selfRefColumnGenerationTableReferenceType 
insertableTableboolean 
updatableTableboolean 
descriptionSQLObjectString 
labelSQLObjectString 
nameENamedElementString 


Associations
NameMy RoleMy ClassOther RoleOther Element
--Not Named--aliasedTableTable--Not Named--DB2Alias
--Not Named--supertableTablesubtablesTable
--Not Named--tableTablecolumnsColumn
--Not Named----Not Named--TableudtStructuredUserDefinedType
--Not Named--subjectTableTabletriggersTrigger
--Not Named--tablesTableschemaSchema
--Not Named--tableTableindexIndex
--Not Named--scopeTableTable--Not Named--ReferenceDataType
--Not Named--aliasedTableTable--Not Named--DB2Alias
--Not Named--synonymedTableTable--Not Named--zSeriesSynonym
--Not Named----Not Named--SQLObjectcommentsComment
=--Not Named--SQLObjectdependenciesDependency
--Not Named--objectSQLObjectprivilegesPrivilege
--Not Named--actionObjectsSQLObject--Not Named--Privilege
--Not Named--eModelElementEModelElementeAnnotationsEAnnotation
--Not Named--contentsEObject--Not Named--EAnnotation
--Not Named--referencesEObject--Not Named--EAnnotation
--Not Named--targetEndEObject--Not Named--Dependency


Generalization Relationships
NameClassSupplier
--Not Named--DB2AliasTable
--Not Named--TableSQLObject
--Not Named--SQLObjectENamedElement
--Not Named--ENamedElementEModelElement
--Not Named--EModelElementEObject



Property Settings

Data Modeler
dmItemFalseDMName 
IsTableFalseIsViewFalse
IsDomainFalseIsSPPackageFalse
Synonymns TableSpaceID 
SourceId SourceType 
CorrelationName SelectClause 
IsUpdateableTrueCheckOptionNone
IsSnapShotFalseIsDistinctFalse
PersistToServer IsPackageFalse