> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# STARTSWITH

> Tests whether a string starts with another string.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

**Aliases:** [`starts_with`](/query/sql/functions/string/starts_with)

Returns NULL if either argument is NULL.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
startswith(value, search)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | STRING | Yes | The string to inspect. |
| search | STRING | Yes | The substring to find. |

## Returns

* Type: BOOLEAN
* Possible values: TRUE or FALSE from a case-sensitive literal substring comparison.
* NULL behavior: Returns NULL if either argument is NULL.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT startswith('abc', 'ab') AS found, startswith('abc', '') AS empty_search;
```

| found | empty\_search |
| - | - |
| true | true |

### Case-sensitive prefixes

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT startswith('Order-42', 'Order') AS same_case, startswith('Order-42', 'order') AS different_case;
```

| same\_case | different\_case |
| - | - |
| true | false |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.