
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.
Advertisements