answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What does the SQL clause ORDER by CustomerLastName DESC do?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you show descending values in SQL?

To show values in descending order, include the keyword DESC after the field name in the ORDER BY clause in the SQL. EX: SELECT FirstName, LastName, BirthDate FROM tblPerson ORDER BY BirthDate DESC, LastName, FirstName


What are the are two sort functions for columns in SQL?

Asc & desc


How do you get top 2 in sql?

SELECT * FROM table ORDER BY value DESC LIMIT 2 OR SELECT TOP 2 FROM table


What is the general format of an SQL query?

In general, SQL "statements" have a Select "clause," a From "clause," and a Where "clause."


What method allows you to reorder the presentation data in SQL?

ORDER BY clause


How can you sort the results from an sql statement?

You can sort the results of a query by using the order by clause. Ex: Select * from tbl_employee order by emp_num The above query would sort the results by the employee number and display them. The default sort is ascending order. Ex: Select * from tbl_employee order by emp_num desc The above query would sort the results by descending order of employee number and display them.


How can you get the 3rd highest salary in SQL from employee database?

select * from ( select eno, ename, sal, rank() over(order by sal desc) rnk ) where rnk = 3


What does the SQL FROM clause do?

mmm


Why you use order by and having clause in sql?

They do completely different things, so I'm not sure why you grouped them into one question.ORDER BY is pretty straightforward: it arranges the results to be in alphabetical or numerical order (or the reverse, if you use ORDER BY column_name DESC). Without it, you get the results in whatever order the database feels like giving them to you, which can and probably will change as new rows are added.The HAVING clause is a little trickier. It's used to restrict the selection based on grouped results (in other words, you can think of it as a variation on the WHERE clause). It can be used to e.g. find duplicates:SELECT Should_Be_Unique_IDFROM MyTableGROUP BY Should_Be_Unique_IDHAVING COUNT(*) > 1;


How do you set up ascending and descending order in a table and a query?

I'm actually not familiar with Access, but I'll try to help. Usually the primary key will physically order the rows in a database table. In SQL-query you can use "order by" clause. The default order is usually ascending. You can also add "asc" or "desc" after the column name. Please do notice, primary keys are not for ordering rows. You should really let the database decide how to save the rows. You should always order the rows in your query (if needed), not modify or trust the physical order! select col1 from foo order by col2 select col1 from foo order by col2 desc, col3 asc


What SQL clause is used to restrict the rows returned by a query?

where


What is use of IN clause and between clause in sql?

It allows you to easily test if an expression is within a range of values (inclusive).