adplus-dvertising
frame-decoration

Question

With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?

a.

SELECT * FROM Persons SORT BY ‘FirstName’ DESC

b.

SELECT * FROM Persons ORDER FirstName DESC

c.

SELECT * FROM Persons SORT ‘FirstName’ DESC

d.

SELECT * FROM Persons ORDER BY FirstName DESC

Posted under SQL Server

Answer: (d).SELECT * FROM Persons ORDER BY FirstName DESC

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?

Similar Questions

Discover Related MCQs

Q. With SQL, how can you return the number of not null records in the “Persons” table?

Q. What does the ALTER TABLE clause do?

Q. The UPDATE SQL clause can _____________

Q. The UNION SQL clause can be used with _____________

Q. Which SQL statement is used to return only different values?

Q. How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?

Q. Which TCL command undo all the updates performed by the SQL in the transaction?

Q. SQL query to find all the cities whose humidity is 95.

Q. SQL query to find the temperature in increasing order of all cities.

Q. What is the meaning of LIKE ‘%0%0%’?

Q. Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.

Q. Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.

Q. Find all the tuples having a temperature greater than ‘Paris’.

Q. Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79.

Q. The command to remove rows from a table ‘CUSTOMER’ is __________________

Q. Which is not a type of join in T-SQL?

Q. Which of the following is not a limitation of view?

Q. SQL Server has mainly how many types of views?

Q. Dynamic Management View is a type of ___________

Q. Syntax for creating views is __________