SQL (Structured Query Language) Question:

Download Job Interview Questions and Answers PDF

Difference between SUBSTR and INSTR?

SQL Interview Question
SQL Interview Question

Answer:

INSTR (String1, String2 (n, (m)),
INSTR returns the position of the m-th occurrence of the string 2 in string1. The search begins from nth position of string1.
SUBSTR (String1 n, m)
SUBSTR returns a character string of size m in string1, starting from n-th position of string1.

Download SQL Interview Questions And Answers PDF

Previous QuestionNext Question
What is a join? Explain the different types of sql joins?What is an integrity constraint?