Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Order values on multiple columns SQL

-- the ORDER BY is used to sort results in order according to the values of one or more columns:
SELECT title, release_year
FROM films
ORDER BY release_year; -- Ascending (is default)
ORDER BY release_year DESC; -- Descending, add DESC
ORDER BY release_year, title; -- add comma to order on multiple columns
Source by campus.datacamp.com #
 
PREVIOUS NEXT
Tagged: #Order #values #multiple #columns #SQL
ADD COMMENT
Topic
Name
8+2 =