LEFT - RIGHT

suggest change

LEFT and RIGHT are not standard SQL. SQL Server accepts them. Oracle does not; use SUBSTR and LENGTH there.

SELECT LEFT('Hello', 2)  -- returns He
SELECT RIGHT('Hello', 2) -- returns lo
SELECT SUBSTR('Hello', 1, 2) -- returns He
SELECT SUBSTR('Hello', LENGTH('Hello') - 2 + 1, 2) -- returns lo

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents