Answers were Sorted based on User's Feedback
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|
Answer / shrikant
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|
Answer / atchala ramanareddy
select substr('atchala ramanareddy',2,9) from dual;
it will return tchala ra.
select instr('atchala ramanareddy','a',1,2) from dual;
it will return 5.
|Is This Answer Correct ?||18 Yes||3 No|
What is the importance of sqlcode and sqlerrm?
How do we accept inputs from user during runtime?
Can we call stored procedure in function?
Can we create view in stored procedure?
Is progress software supports to ( pl/sql )?
what happens if you no create privilege in a database? : Sql dba
what is the difference between a having clause and a where clause? : Sql dba
what is union, minus and interact commands? : Sql dba
Is there a way to automate sql execution from the command-line, batch job or shell script?
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.
What are the advantages of sql? Explain
How does one load ebcdic data? : aql loader