LEFT
Jump to navigation
Jump to search
LEFT(s,i) | ||
---|---|---|
Engine | OK | Alternative |
ingres | Yes | |
mysql | Yes | |
oracle | No | SUBSTR(s, 1, i) |
postgres | No | SUBSTRING(s, 1, i) |
sqlserver | Yes |
LEFT
LEFT(s,n) allows you to extract n characters from the start of the string s.
LEFT('Hello world', 4) -> 'Hell'
SELECT name,
SUBSTRING(name, 1, 3)
FROM bbc
SELECT name,
SUBSTR(name, 1, 3)
FROM bbc
SELECT name,
LEFT(name, 3)
FROM bbc
See also
Language: | English • Deutsch |
---|