# SUBSTRING

| **Description** | The **`SUBSTRING()`** function is used to extract a substring from a text string, starting from a specified character position and of a specified length. This function is useful for text manipulation and data extraction. |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Syntax**      | SUBSTRING(**`text`**, **`start`**, \[**length**])                                                                                                                                                                            |

1. **`text`**: The input text string from which you want to extract a substring.
2. **`start`**: The starting position within the text string. The start position begins at 1.
3. **length**: (Optional) The length of the substring to be extracted.

## Example

### Table

| ID | Product Code |
| -- | ------------ |
| 1  | ELE12345     |
| 2  | CLO67890     |
| 3  | FOO45678     |

### Function

```
SUBSTRING(`Product Code`, 4)
```

### Results

| SUBSTRING (text) |
| ---------------- |
| 12345            |
| 67890            |
| 45678            |
