---
schema_version: "1"
id: 1c150ef3e4e75415f06114fa174f7b89a2a9887b15a5839b3f1f7737e403207f
title: ENDS_WITH
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/scalar-func/string-func/ends-with.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/ends-with.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 064dcc9a629b3b4e2022493e74264c36619d4c03d9b816b973bd2f17bc6afa42
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `ENDS_WITH`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns `true` if a string ends with a specified suffix.

## Syntax

```sql
ends_with(<string>, <suffix>)
```

## Arguments

### Required

- `<string>`: The string to check.
- `<suffix>`: The suffix to look for.

## Returns

Returns a boolean value that indicates whether the string ends with the suffix.

## Considerations

- Comparison is case-sensitive.
- An empty suffix returns `true` for any string.

## Examples

### Check Suffix

Check whether a string ends with a suffix.

```sql
SELECT ends_with('alphabet', 'bet') AS result;
```

Returns `true`.

## Related Documentation

- [String Types](https://developer.salesforce.com/docs/data/data-cloud-query-guide/datatype/string.md)
