SQL SUBSTRING - Introduction and syntax
SQL - Dec 03, 2008 at 18:00 PM by Rajmeet Ghai
Explain the SQL SUBSTRING statement. Write SQL syntax for the SQL SUBSTRING
statement along with an example.
SQL SUBSTRING: The Substring function in SQL is used to capture
a portion of the stored data
Syntax:
SUBSTR(str,pos,len): Starting with the
th character in string and select the next
characters.
Example:
SELECT SUBSTR(company_name, 3) FROM Company WHERE company_name =
‘tata’;
|