0
0
MySQLquery~5 mins

ASC and DESC direction in MySQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does ASC mean in SQL ORDER BY clause?
ASC means ascending order. It sorts data from smallest to largest, like A to Z or 1 to 10.
Click to reveal answer
beginner
What does DESC mean in SQL ORDER BY clause?
DESC means descending order. It sorts data from largest to smallest, like Z to A or 10 to 1.
Click to reveal answer
beginner
How do you sort a list of names in descending order in SQL?
Use ORDER BY column_name DESC. For example: SELECT name FROM users ORDER BY name DESC;
Click to reveal answer
beginner
If you want to sort numbers from smallest to largest, which keyword do you use?
Use ASC to sort numbers from smallest to largest.
Click to reveal answer
beginner
What is the default sorting order if you do not specify ASC or DESC?
The default sorting order is ASC (ascending).
Click to reveal answer
Which keyword sorts data from largest to smallest?
AASC
BORDER
CDESC
DSORT
What is the default order when using ORDER BY without ASC or DESC?
ADESC
BASC
CRandom
DNo order
How would you sort a column named 'age' from youngest to oldest?
AORDER BY age DESC
BORDER BY age RANDOM
CORDER BY age
DORDER BY age ASC
Which of these is a valid SQL clause to sort data?
AORDER BY column_name ASC
BSORT BY column_name
CFILTER BY column_name DESC
DGROUP BY column_name ASC
If you want to see the highest scores first, which ORDER BY clause do you use?
AORDER BY score DESC
BORDER BY score ASC
CORDER BY score RANDOM
DORDER BY score
Explain the difference between ASC and DESC in SQL sorting.
Think about how you arrange numbers or words from A to Z or Z to A.
You got /4 concepts.
    How do you write a query to sort a list of products by price from highest to lowest?
    Remember DESC means descending order.
    You got /3 concepts.