Complete the code to select all names sorted alphabetically using the default collation.
SELECT name FROM users ORDER BY name [1];The ORDER BY clause sorts results. ASC means ascending order (A to Z).
Complete the code to sort names using the French collation.
SELECT name FROM users ORDER BY name COLLATE [1];Using COLLATE 'fr_FR.UTF-8' sorts strings according to French rules.
Fix the error in the code to sort names case-sensitively using the C collation.
SELECT name FROM users ORDER BY name COLLATE [1];The 'C' collation sorts bytes directly and is case-sensitive but fastest. It is valid in PostgreSQL.
Fill both blanks to select names sorted ascending with German collation and case-sensitive.
SELECT name FROM users ORDER BY name COLLATE [1] [2];
'de_DE.UTF-8' sets German collation. ASC sorts ascending.
Fill both blanks to select names sorted descending with Spanish collation and case-sensitive.
SELECT name FROM users ORDER BY name COLLATE [1] [2];
'es_ES.UTF-8' sets Spanish collation. DESC sorts descending.