---
title: "gsql_find()"
component: "gsql-ref"
version: "4.3"
module: "ddl-and-loading"
html_url: "/gsql-ref/4.3/ddl-and-loading/functions/token/gsql_find"
canonical_url: "https://www.tigergraph.com/docs/gsql-ref/4.3/ddl-and-loading/functions/token/gsql_find"
markdown_url: "https://www.tigergraph.com/docs/gsql-ref/4.3/ddl-and-loading/functions/token/gsql_find.md"
---

[View as HTML](https://www.tigergraph.com/docs/gsql-ref/4.3/ddl-and-loading/functions/token/gsql_find)

# gsql_find()

Returns the start index of the substring within the string. If it is not found, then return -1.

## Syntax

`gsql_find(str, substr)`

## Parameters

str

The string in which to find the start index of the substring.

substr

The substring whose start index to find in the given string.

## Return type

`INT`

## Example

gsql_find("abcd", "bcd") -> 1
