Difference between revisions of "LENGTH"

From SQLZOO
Jump to: navigation, search
(Created page with "<table align='right' border='1'> <caption>Compatibility</caption> <tr><th colspan='3'>LENGTH</th></tr> <tr><td align='center'>'''Engine'''</td><td align='center'>'''OK'''</td>...")
 
Line 7: Line 7:
 
<tr><td align='left'>oracle</td><td>Yes</td><td></td></tr>
 
<tr><td align='left'>oracle</td><td>Yes</td><td></td></tr>
 
<tr><td align='left'>postgres</td><td>Yes</td><td></td></tr>
 
<tr><td align='left'>postgres</td><td>Yes</td><td></td></tr>
<tr><td align='left'>sqlserver</td><td>No</td><td>LEN(s)</td></tr>
+
<tr><td align='left'>sqlserver</td><td>No</td><td>[[LEN |LEN(s)]]</td></tr>
 
</table>
 
</table>
 
<h1>LENGTH</h1>
 
<h1>LENGTH</h1>
Line 29: Line 29:
 
<p>See also</p>
 
<p>See also</p>
 
<ul>
 
<ul>
   <li>[[SUBSTRING function]]</li>
+
   <li>[[SUBSTRING |SUBSTRING function]]</li>
   <li>[[(concatenate) function]]</li>
+
   <li>[[CONCAT |(concatenate) function]]</li>
 
</ul>
 
</ul>

Revision as of 16:06, 16 July 2012

Compatibility
LENGTH
EngineOKAlternative
ingresYes
mysqlYes
oracleYes
postgresYes
sqlserverNoLEN(s)

LENGTH

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

    LENGTH('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