Column Aliases,SQL ALIAS
Here you will know how to use column aliases as one way to customize SELECT statements.
- USING A COLUMN ALIASES
You can use column aliases to assign a different name to a column heading
Example
SELECT ENAME EMPNAME, SAL SALARY
FROM EMP;
EMPNAME SALARY
---------- ----------
SMITH 800
ALLEN 1600
WARD 1250
JONES 2975
MARTIN 1250
BLAKE 2850
CLARK 2450
SCOTT 3000
KING 5000
TURNER 1500
ADAMS 1100
EMPNAME SALARY
---------- ----------
JAMES 950
FORD 3000
MILLER 1300
You can use practices to get aliases " " or you can use AS
EXAMPLE
SELECT ENAME "EMPNAME", SAL AS SALARY
FROM EMP;
No comments:
Post a Comment