Difference between revisions of "LEN"

From SQLZOO
Jump to: navigation, search
(Created page with "<table align='right' border='1'> <caption>Compatibility</caption> <tr><th colspan='3'>LEN</th></tr> <tr><td align='center'>'''Engine'''</td><td align='center'>'''OK'''</td><td...")
 
Line 6: Line 6:
 
<tr><td align='left'>mysql</td><td>No</td><td>[[LENGTH |LENGTH(S)]]</td></tr>
 
<tr><td align='left'>mysql</td><td>No</td><td>[[LENGTH |LENGTH(S)]]</td></tr>
 
<tr><td align='left'>oracle</td><td>No</td><td>[[LENGTH |LENGTH(S)]]</td></tr>
 
<tr><td align='left'>oracle</td><td>No</td><td>[[LENGTH |LENGTH(S)]]</td></tr>
<tr><td align='left'>postgres</td><td>No<td><td>[[LENGTH |LENGTH(S)]]</td></tr>
+
<tr><td align='left'>postgres</td><td>No</td><td>[[LENGTH |LENGTH(S)]]</td></tr>
 
<tr><td align='left'>sqlserver</td><td>Yes</td><td>LEN(s)</td></tr>
 
<tr><td align='left'>sqlserver</td><td>Yes</td><td>LEN(s)</td></tr>
 
</table>
 
</table>

Revision as of 11:29, 16 July 2012

Compatibility
LEN
EngineOKAlternative
ingresNoLENGTH(S)
mysqlNoLENGTH(S)
oracleNoLENGTH(S)
postgresNoLENGTH(S)
sqlserverYesLEN(s)

LENGTH

LEN(s) returns the number of characters in string s.

    LEN('Hello') -> 5  
SELECT LEN(name), name
  FROM bbc
SELECT LENGTH(name), name
  FROM bbc

See also

Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense