Difference between revisions of "SUBSTRING"

From SQLZOO
Jump to: navigation, search
Line 9: Line 9:
 
<tr><td align='left'>sqlserver</td><td>Yes</td><td></td></tr>
 
<tr><td align='left'>sqlserver</td><td>Yes</td><td></td></tr>
 
</table>
 
</table>
 +
 
<h1> SUBSTRING</h1>
 
<h1> SUBSTRING</h1>
 
<p>SUBSTRING allows you to extract part of a string. </p>
 
<p>SUBSTRING allows you to extract part of a string. </p>
Line 28: Line 29:
 
</source>
 
</source>
 
</div>
 
</div>
 +
 +
{{Languages}}

Revision as of 10:53, 28 October 2012

Compatibility
SUBSTRING(s FROM i FOR j)
EngineOKAlternative
ingresYesSUBSTRING(s FROM i FOR j)
mysqlYesSUBSTRING(s FROM i FOR j)
oracleNoSUBSTR(s,i,j)
postgresYesSUBSTRING(s FROM i FOR j)
sqlserverYes

SUBSTRING

SUBSTRING allows you to extract part of a string.

   SUBSTRING('Hello world', 2, 3) -> 'llo'    
SELECT name,
       SUBSTR(name, 2, 5)
  FROM bbc
SELECT name,
       SUBSTRING(name, 2, 5)
  FROM bbc
Language: English  • Deutsch
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense