---
title: "How to fetch a substring from a given string in SQL Server?"  
description: "How to fetch a substring from a given string in SQL Server?"  
author: "Ashutosh Kumar Verma"  
published: 2021-11-18  
canonical: https://www.mindstick.com/interview/33834/how-to-fetch-a-substring-from-a-given-string-in-sql-server  
category: "mssql server"  
tags: ["sql server", "sql"]  
reading_time: 1 minute  

---

# How to fetch a substring from a given string in SQL Server?

SQL **LEFT()** function:

```
SELECT LEFT('MindStick.com',4)
```

## Output:

Mind **\**

## Answers

### Answer by Ashutosh Kumar Verma

SQL **LEFT()** function:

```
SELECT LEFT('MindStick.com',4)
```

## Output:

Mind **\**


---

Original Source: https://www.mindstick.com/interview/33834/how-to-fetch-a-substring-from-a-given-string-in-sql-server

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
