Discussion
SQL provides the AS keyword, which can be used to assign meaningful column names to the results of queries using the SQL built-in functions.
Answer: A
Correct answer: True
AS assigns an alias, and it is particularly useful with aggregates, whose default column names are the expressions themselves - COUNT(*) or worse. SELECT COUNT(*) AS order_count gives the result a name a program or a report can use.
It also aliases tables, as in FROM customer AS c, which is what makes a self-join possible. The keyword is optional in most dialects for both purposes, but writing it makes the intent explicit and avoids a missing comma silently becoming an alias.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development