<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/database](./database.md) &gt; [startAfter](./database.startafter.md)

## startAfter() function

Creates a `QueryConstraint` with the specified starting point (exclusive).

Using `startAt()`<!-- -->, `startAfter()`<!-- -->, `endBefore()`<!-- -->, `endAt()` and `equalTo()` allows you to choose arbitrary starting and ending points for your queries.

The starting point is exclusive. If only a value is provided, children with a value greater than the specified value will be included in the query. If a key is specified, then children must have a value greater than or equal to the specified value and a a key name greater than the specified key.

<b>Signature:</b>

```typescript
export declare function startAfter(value: number | string | boolean | null, key?: string): QueryConstraint;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | number \| string \| boolean \| null | The value to start after. The argument type depends on which <code>orderBy*()</code> function was used in this query. Specify a value that matches the <code>orderBy*()</code> type. When used in combination with <code>orderByKey()</code>, the value must be a string. |
|  key | string | The child key to start after. This argument is only allowed if ordering by child, value, or priority. |

<b>Returns:</b>

[QueryConstraint](./database.queryconstraint.md)

