STARTS_WITH

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns true if a string starts with a specified prefix.

Syntax

starts_with(<string>, <prefix>)

Arguments

Required

  • <string>: The string to check.
  • <prefix>: The prefix to look for.

Returns

Returns a boolean value that indicates whether the string starts with the prefix.

Considerations

  • Comparison is case-sensitive.
  • An empty prefix returns true for any string.

Examples

Check Prefix

Check whether a string starts with a prefix.

SELECT starts_with('alphabet', 'alph') AS result;

Returns true.

Related Documentation