LEFT/de

From SQLZOO
Revision as of 11:54, 28 October 2012 by Peter (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Kompatibilität
LEFT(s,i)
DBMSOKAlternative
IngresJa
MySQLJa
OracleNein SUBSTR(s, 1, i)
PostgreSQLNein SUBSTRING(s, 1, i)
SQL ServerJa

LEFT

LEFT(s,n) liefert n Zeichen aus der Zeichenkette s, beginnend vom Anfang der Zeichenkette.

   LEFT('Hallo Welt', 4) -> 'Hall'     
SELECT name,
       SUBSTRING(name, 1, 3)
  FROM bbc
SELECT name,
       SUBSTR(name, 1, 3)
  FROM bbc
SELECT name,
       LEFT(name, 3)
  FROM bbc

Siehe auch

Language:Project:Language policy [[:{{#invoke:String|sub|LEFT/de
 |1
 |Expression error: Unrecognized punctuation character "{".
}}|English]]