Difference between SUBSTR and INSTR?

Answer Posted / 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 ?    65 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is primary key secondary key alternate key candidate key?

540


what are the different index configurations a table can have? : Sql dba

566


What is cross join sql?

494


Define tables and fields in a database

644


What is the best sql course?

532






Are left and right joins the same?

529


What is the purpose of primary key?

528


How many sectors are in a partition?

555


how would you get the current date in mysql? : Sql dba

537


How to disable a trigger name update_salary?

671


Explain what is sql?

604


What is a unique constraint?

606


How do I run pl sql in sql developer?

624


how to get a list of indexes of an existing table? : Sql dba

512


what is the bond code in materialized view?

2489