Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Difference between SUBSTR and INSTR?

Answers were Sorted based on User's Feedback



Difference between SUBSTR and INSTR?..

Answer / tulsi

SUBSTR is used to extract a set of characters from a string
by specificing the character starting position and end
position and length of characters to be fetched.
example substr('hello',2,3) will return 'ell'

INSTR is used to find the position of any particular
character in a word which returns numeric value.
instr('hello','e') - will return the position of 'e' as 2

Is This Answer Correct ?    63 Yes 6 No

Difference between SUBSTR and INSTR?..

Answer / shrikant

Hi,
Yes Tulsi is right.
Execute the below queries & you will see the diff clearly -

SELECT instr('hello','e') FROM dual
SELECT substr('hello',2,3) FROM dual

Is This Answer Correct ?    33 Yes 4 No

Difference between SUBSTR and INSTR?..

Answer / atchala ramanareddy

substr:
select substr('atchala ramanareddy',2,9) from dual;
it will return tchala ra.
instr:
select instr('atchala ramanareddy','a',1,2) from dual;
it will return 5.

Is This Answer Correct ?    18 Yes 3 No

Post New Answer



More SQL PLSQL Interview Questions

What is the importance of sqlcode and sqlerrm?

0 Answers  


How do we accept inputs from user during runtime?

0 Answers  


Can we call stored procedure in function?

0 Answers  


Can we create view in stored procedure?

0 Answers  


Is progress software supports to ( pl/sql )?

0 Answers  






what happens if you no create privilege in a database? : Sql dba

0 Answers  


what is the difference between a having clause and a where clause? : Sql dba

0 Answers  


what is union, minus and interact commands? : Sql dba

0 Answers  


Is there a way to automate sql execution from the command-line, batch job or shell script?

0 Answers  


consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ename who having maximum salary in deptno 10 and 20.

23 Answers   Mind Tree,


What are the advantages of sql? Explain

0 Answers  


How does one load ebcdic data? : aql loader

0 Answers  






Categories