Discussion
In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk (*) means that:
Answer: A
Correct answer: all columns of the table are to be returned.
The asterisk is shorthand in the SELECT list, standing for every column of the source in the order the table defines them. It says nothing about which rows come back - that is the WHERE clause's work, and the other options describe row filtering.
Convenient as it is, SELECT * is poor practice in application code: adding a column to the table silently changes the result set, and the query fetches data the program does not use. Naming the columns explicitly avoids both.
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