https://plsqlquery.blogspot.com/2018/05/using-instr-in-plsql-query.html
Finds numeric Position of a named Character
select INSTR('PAKISTAN','I') from dual;
4
select INSTR('PAKISTAN','i') from dual;
0
select INSTR('PAKISTAN','TA') from dual;
6
select INSTR('PAKISTAN','A') from dual;
2
select ENAME , INSTR(ENAME,'K') from EMP;
ENAME INSTR(ENAME,'A')
SMITH 0
ALLEN 1
WARD 2
JONES 0
MARTIN 2
etc......
Find Occurrence of 'a' Start from 3rd Position
select INSTR('PAKISTAN','A',3) from dual;
7
Finds numeric Position of a named Character
select INSTR('PAKISTAN','I') from dual;
4
select INSTR('PAKISTAN','i') from dual;
0
select INSTR('PAKISTAN','TA') from dual;
6
select INSTR('PAKISTAN','A') from dual;
2
select ENAME , INSTR(ENAME,'K') from EMP;
ENAME INSTR(ENAME,'A')
SMITH 0
ALLEN 1
WARD 2
JONES 0
MARTIN 2
etc......
Find Occurrence of 'a' Start from 3rd Position
select INSTR('PAKISTAN','A',3) from dual;
7
No comments:
Post a Comment