Knowee
Questions
Features
Study Tools

Which SQL statement will list the employee details inside the EMPLOYEE table order by last names in ascending order, if two employees have same last name order them by the employee first name in ascending order?Select one:a.​SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE     FROM EMPLOYEE          ORDER BY  EMP_LNAME ASC, EMP_FNAME DESC;​b.​SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE     FROM EMPLOYEE          LIST BY  EMP_FNAME, EMP_LNAME;​c.​SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE     FROM EMPLOYEE          ORDER BY  EMP_LNAME, EMP_FNAME;​d.​SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE     FROM EMPLOYEE          ORDER BY  EMP_FNAME, EMP_LNAME;

Question

Which SQL statement will list the employee details inside the EMPLOYEE table order by last names in ascending order, if two employees have same last name order them by the employee first name in ascending order?Select one:a.​SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE     FROM EMPLOYEE          ORDER BY  EMP_LNAME ASC, EMP_FNAME DESC;​b.​SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE     FROM EMPLOYEE          LIST BY  EMP_FNAME, EMP_LNAME;​c.​SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE     FROM EMPLOYEE          ORDER BY  EMP_LNAME, EMP_FNAME;​d.​SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE     FROM EMPLOYEE          ORDER BY  EMP_FNAME, EMP_LNAME;

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct answer is c. This SQL statement will list the employee details from the EMPLOYEE table and order them by last name in ascending order. If two employees have the same last name, they will be ordered by their first name in ascending order. The statement is as follows:

SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE, EMP_PHONE FROM EMPLOYEE ORDER BY EMP_LNAME, EMP_FNAME;

Similar Questions

Use a UNION to create a list of all the employee's and customer's first names and last names ordered by the last name in descending order.

Write a query to retrieve the names of all employees and sort them in ascending order.Table: EmployeeInput records:Input format :The input table is already created, and records are already prepopulated, as mentioned in the problem statement.Output format :The output displays the names of all employees in ascending order as shown below.NameAngelMarkMathewSteveRefer to the sample output for the column headers.

From the given table "emp_det" which has column values "emp_id", "fist_name", "last_name", "email","person_id", "dept_id", "salary". Write a SQL query to retrieve the employee ID, first name, and last name of employees whose first names contain the letter 'S' and who work in departments where at least one employee's first name contains the letter 'S'.Table Name: emp_det

employee_id Name Salary1001 Annie 60001009 Ross 45001018 Zeith 7000above are the Employee table details.select employee_id from employee order by employee_id desc;Which of the following output will be true?

Write a query to display the subject_name and subject_code of the subjects handled by the staff named 'Lakshmi'. Display the records sorted in ascending order based on subject_name.Note:1. Display only the subject_name and subject_code of the subjects handled by the staff named 'Lakshmi'.2. Use Joins. Tables involved are subject and staff3. Order by is mandatory.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.