Left Characters in SQL

Level 124 keystrokes

LEFT function returns the leftmost characters of a string.

SQL code

-- LEFT(string, n) returns the first n characters
-- The first 3 characters of 'Hello' are 'Hel'
1SELECT LEFT('Hello', 3);

Output

+------------------+
| LEFT('Hello', 3) |
+------------------+
| Hel              |
+------------------+
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