https://randomsrsolutions.blogspot.com/2018/05/using-substr-in-plsql-query.html
SUBSTR Extracts a string of a determined Length
select substr('PAKISTAN',4) from dual;
ISTAN
select substr('PAKISTAN',4,3) from dual;
IST
select substr('PAKISTAN',-1,1) from dual;
N
select substr('PAKISTAN',-2,1) from dual;
A
select substr('PAKISTAN',-3,3) from dual;
TAN
Retrieve all Employees whose name begins with S
select ENAME from EMP where substr(ENAME,1,1) = 'S';
SCOTT
SMITH
Retrieve all Employees whose Name Contains A in Second position
select ENAME from EMP where substr(ENAME,2,1) = 'A';
WARD
MARTIN
JAMES
select ENAME from EMP where ENAME like '_A%';
WARD
MARTIN
JAMES
Retrieve all Employees whose name ends with S
select ENAME from EMP where substr(ENAME,-1,1) = 'S';
JONES
ADAMS
JAMES
select ENAME from EMP where ENAME like '%S';
JONES
ADAMS
JAMES
Subscribe to:
Post Comments (Atom)
XLA to GL Link
https://plsqlquery.blogspot.com/2025/12/xla-to-gl-link.html SELECT acr.cash_receipt_id, acr.receipt_number, ...
-
https://plsqlquery.blogspot.com/2018/05/using-outer-joins-in-plsql-query.html We use Outer Join when mismatched Values to be displayed ...
-
https://plsqlquery.blogspot.com/2018/05/using-trim-in-plsql-query.html The Oracle/PLSQL TRIM function removes all specified characters eit...
-
https://randomsrsolutions.blogspot.com/2018/05/using-trunc-function-with-numbers-in.html The TRUNC function Truncates the Column, Expressi...
No comments:
Post a Comment