Working With Aliases :
1. An alias is an alternate name given for any oracle object.
2. Aliases is oracle are of two types
- Column Alias
- Table Alias
4. The column alias is specified in the SELECT list by declaring the alias after the column name by using the space separator.
5. Alias headings appear in Upper casing by default.
6. The alias should be declared in double quotes if it is against the specifications of naming conversions.
7. The AS keyword can be used between the column name and alias.
8. An alias effectively renames the select list item for the duration of the query.
9. An alias cannot be used, any where in the SELECT list for operational purpose.
Example 1:
SQL>SELECT Empno "Employee number ", Ename "Employee Name ", Job Designation, Sal Salary, Comm Commission FROM Emp;
Example 2:
SQL>SELECT Empno AS "Employee number ", Ename AS "Employee Name ", Job AS Designation, Sal AS Salary, Comm AS Commission FROM Emp;
Note : Table Aliases will be explained in the further postings because it is not the right time to discuss about table aliases



0 comments
Post a Comment
Do comment to make this blog better