Right Characters in SQL

Level 125 keystrokes

RIGHT function returns the rightmost characters of a string.

SQL code

-- RIGHT(string, n) returns the last n characters
-- The last 3 characters of 'World' are 'rld'
1SELECT RIGHT('World', 3);

Output

+-------------------+
| RIGHT('World', 3) |
+-------------------+
| rld               |
+-------------------+
1 row in set
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this SQL code and how often they appear.

  • '× 2
  • ,× 1
  • ;× 1
  • (× 1
  • )× 1

More SQL examples at level 1

← SQL typing practice