Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews DB Oracle Interviews:Concepts and ArchitectureData AccessDatabase ArchitectureDatabase ManagementDatabase Security OracleDistributed ProcessingFlexfieldForms ReportsGeneral OracleMemory ManagementMTO-SAP Financial AccountingOCIOracle AOLOracle AROracle Backup RecoveryOracle D2KOracle DatabaseOracle Database DeveloperOracle DB OptimizationOracle DBAOracle DeveloperOracle ETLOracle Forms 3.0Oracle Forms 4.0Oracle GLOracle PL-SQLOracle RMANOracle ScenariosOracle SecurityOracle SQLOracle System ArchitectureOracle Technology Network (OTN)Programmatic ConstructsRAC (Real Application Clusters)SQL Plus
Copyright © 2018. All Rights Reserved
Oracle Database Interview Question:
How To Name Query Output Columns in Oracle?
Submitted by: AdministratorEach column in the query output has a default name. If you don't like the default name, you can specify a new name for any column in the query output by using the AS clause. The following statement shows you a good example:
SQL> SELECT department_id AS ID, MIN(salary) AS Low,
2 MAX(salary) AS High, AVG(salary) AS Average
3 FROM employees GROUP BY department_id
4 HAVING AVG(salary) < 5000;
<pre> ID LOW HIGH AVERAGE
---------- ---------- ---------- ----------
30 2500 11000 4150
50 2100 8200 3475.55556
10 4400 4400 4400</pre>
Submitted by: Administrator
SQL> SELECT department_id AS ID, MIN(salary) AS Low,
2 MAX(salary) AS High, AVG(salary) AS Average
3 FROM employees GROUP BY department_id
4 HAVING AVG(salary) < 5000;
<pre> ID LOW HIGH AVERAGE
---------- ---------- ---------- ----------
30 2500 11000 4150
50 2100 8200 3475.55556
10 4400 4400 4400</pre>
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.