---
title: "What is difference between SUBSTR and INSTR?"  
description: "What is difference between SUBSTR and INSTR?"  
author: "Sumit Kesarwani"  
published: 2014-01-31  
updated: 2020-09-24  
canonical: https://www.mindstick.com/interview/1905/what-is-difference-between-substr-and-instr  
category: "mysql"  
tags: ["mysql"]  
reading_time: 1 minute  

---

# What is difference between SUBSTR and INSTR?

INSTR function search string for sub-string and returns an integer indicating the position of the character in string that is the first character of this occurrence.SUBSTR function return a portion of string, beginning at character position, substring_length characters long.SUBSTR calculates lengths using characters as defined by the input character set.

## Answers

### Answer by Sumit Kesarwani

INSTR function search string for sub-string and returns an integer indicating the position of the character in string that is the first character of this occurrence.SUBSTR function return a portion of string, beginning at character position, substring_length characters long.SUBSTR calculates lengths using characters as defined by the input character set.


---

Original Source: https://www.mindstick.com/interview/1905/what-is-difference-between-substr-and-instr

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
