↑ Grab this Headline Animator

Thursday, November 13, 2008

What is difference between SUBSTR and INSTR in the SQL?

SUBSTR returns a specified portion of a string

Example: SUBSTR('BCDEF',4)
The result will be: BCDE

INSTR provides character position in which a pattern is found in a string.

Example: INSTR('ABC-DC-F','-',2)
The result will be: 7 (2nd occurence of '-')

Submit this story to DotNetKicks

No comments:

Post a Comment

Post your comments/questions/feedback for this Article.


Latest Articles