1.

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 DESCI have been asked this question during an online interview.My doubt stems from Basic SQL in division Laying the Foundation of SQL Server

Answer»

Correct choice is (d) SELECT * FROM Persons ORDER BY FirstName DESC

Explanation: The SQL SELECT statement queries DATA from TABLES in the database.



Discussion

No Comment Found

Related InterviewSolutions