GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL

 Print  |  
Question:  What is difference between SUBSTR and INSTR?


Answer:
SUBSTR returns a specified portion of a string eg SUBSTR('BCDEF',4) output BCDE
INSTR provides character position in which a pattern is found in a string. eg INSTR('ABC-DC-F','-',2) output 7 (2nd occurence of '-')


April 04, 2007 00:39:41 #5
 i.v.praveen   Member Since: Visitor    Total Comments: N/A 

RE: What is difference between SUBSTR and INSTR?...
 

SUBSTR returns a character where as INSTR returns number

     

 

Back To Question