| [ Web Proxy ] |
| Viewing: https://riptutorial.com/sql/example/7740/left---right | [Back] [Original] |
[logo rip]
Syntax is:
LEFT ( string-expression , integer )
RIGHT ( string-expression , integer )
SELECT LEFT('Hello',2) --return He
SELECT RIGHT('Hello',2) --return lo
Oracle SQL doesn't have LEFT and RIGHT functions. They can be emulated with SUBSTR and LENGTH.
SUBSTR ( string-expression, 1, integer )
SUBSTR ( string-expression, length(string-expression)-integer+1, integer)
SELECT SUBSTR('Hello',1,2) --return He
SELECT SUBSTR('Hello',LENGTH('Hello')-2+1,2) --return lo
| Web Proxy Viewer | New URL | Original Page |