Consider the following statement: SELECT emp_no, name FROM employee _________desig Which of the following option will be used to display the employee number and names of similar designations together?

(A) FIELD()

(B) GROUP BY

(C) ORDER BY

(D) Both (b) and (c)

 

Answer:

Checking the options

  • (A) FIELD() - It is not an aggregate function is SQL
  • (B) GROUP BY - It is used to arrange identical data into groups
  • (C) ORDER BY - It is used to sort the data in ascending or descending order, based on one or more columns
  • (D) Both (b) and (c) 

So, to display the employee number and names of similar designations together we have to use the GROUP BY clause.

So, the correct answer is (B)

Remove Ads
Teachoo · Class 12 Explore Class 12

Transcript

Consider the following statement: SELECT emp_no, name FROM employee _________desig Which of the following option will be used to display the employee number and names of similar designations together? (A) FIELD() (B) GROUP BY (C) ORDER BY (D) Both (b) and (c) Answer: Checking the options (A) FIELD() - It is not an aggregate function is SQL (B) GROUP BY - It is used to arrange identical data into groups (C) ORDER BY - It is used to sort the data in ascending or descending order, based on one or more columns (D) Both (b) and (c) So, to display the employee number and names of similar designations together we have to use the GROUP BY clause. So, the correct answer is (B)

Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.