Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion int.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ In CockroachDB, the following are aliases for `INT`:

## Format

When inserting into an `INT` column, format the value as `12345`.
An `INT` column accepts numeric literals and hexadecimal-encoded numeric literals.

### Numeric Literal

When inserting a numeric literal into an `INT` column, format the value as `12345`.

### Hexadecimal-Encoded Numeric Literal

When inserting a hexadecimal-encoded numeric literal into a `INT` column, format the value as hexadecimal digits preceded by `0x`. For example, `0xcafe1111` corresponds to the numeric literal `3405648145`.

## Size

Expand Down
8 changes: 6 additions & 2 deletions string.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@ When inserting a string:

## Format

A `STRING` column accepts both string literals and escape strings.
A `STRING` column accepts Unicode string literals, hexadecimal string literals, and escape strings.

### String Literal

When inserting a string literal into a `STRING` column, format the value as Unicode characters within single quotes, e.g., `'a1b2c3'`.

### Hexadecimal-Encoded String Literal

When inserting a hexadecimal-encoded string literal into a `STRING` column, format the value as `x` or `X` followed by hexadecimal digits in single quotes. For example, `x'636174'` or `X'636174'` correspond to the Unicode string literal `'cat'`.

### Escape String

When inserting an escape string into a `STRING` column, use either `e` or `E` and followed by one or more of the following backslash escape sequences within single quotes:
When inserting an escape string into a `STRING` column, format the value as `e` or `E` followed by one or more of the following backslash escape sequences within single quotes:

Backslash Escape Sequence | Interpretation
--------------------------|---------------
Expand Down