- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create an ALIAS TAB2 for DB2 table TAB1?
The ALIAS is basically a different name given to a particular object in a database. An ALIAS can be defined for a table, view or another alias and the existence of the object is not verified during the creation of the alias. The ALIAS is used to hide the location qualifier and we need SYSADM authority to create a new ALIAS. When the object is dropped, its corresponding ALIAS is not dropped.
We can use the below command in order to create a new ALIAS for a table.
CREATE ALIAS T1 FOR DBSET1.TAB1
The CREATE ALIAS reserved words are followed by the name of ALIAS which needs to be created. Then we have to mention the name of the table qualified by database using FOR parameter. This will create a new alias T1 for the table TAB1 which is residing in database DBSET1.
- How to create a table TAB2 having same attributes & columns as for table TAB1
- How to delete a DB2 table TAB1?
- How to find out all the indexes for a DB2 table TAB1?
- How to do a full & incremental MERGECOPY for a DB2 table TAB1?
- How to add a row compression to a DB2 table TAB1?
- How to find the primary key of a DB2 table TAB1?
- How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?
- How to image copy the entire DB2 table TAB1 into a dataset?
- How to find all the foreign keys of a DB2 table TAB1?
- How to create a DB2 table TAB1 with 4 columns, Student ID, Enrollment ID, Name and Age?
- How to add a new column Address in the above DB2 table TAB1?
- How will you add a constraint on above DB2 table TAB1 for ages between 3 to 16 years?
- How to create PowerShell alias permanently?
- How to use an alias() for the parameter in PowerShell?
- How to create new alias with PowerShell?