---
schema_version: "1"
id: a9374ba229babfc086efff2ae950eb90ba8da581bb42f60afd5263d3aa653546
title: SPACE
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/space.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/space.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: cae32867337a55168790f36a13b9d47a516599a277b55d7ea8b6b61b0cd4ee16
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `SPACE`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Returns a string of whitespace characters of the specified length.

## Syntax

```sql
space(<length>)
```

## Arguments

### Required

- `<length>`: The number of space characters to generate.

## Returns

Returns a text value that contains the specified number of spaces.

## Considerations

- If length is `0` or negative, the function returns an empty string.

## Examples

### Generate Spaces

Create a string of five spaces.

```sql
SELECT space(5) AS result;
```

Returns a string containing 5 space characters.

## Related Documentation

- [String Types](https://developer.salesforce.com/docs/data/data-cloud-query-guide/datatype/string.md)
