invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

ZERO_BLOB

Syntax

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> ZERO_BLOB[ZERO_BLOB]:::quoted
    ZERO_BLOB --> End((END))

Purpose

The ZERO_BLOB SQL function generates a blob with 0-byte values.

See also RANDOM_BLOB.

Parameters:

  • Length (int32): Produce a blob with this length in terms of bytes, from 0 to 67,108,864.

Returns: A blob with 0-byte values.

Examples

The following example generates a blob of 100 bytes with 0-byte values and retrieves the length in bytes:

select length(zero_blob(100))

-------------------
100

The following example shows that a null length evaluates to null:

select zero_blob(null)

-------------------