Results of 1 - 10 of about 17 for literals (0.001 sec.)
- Literal Types 15277
- DuckDB has special literal types for representing NULL , integer and string literals in queries. These have their own binding and conversion rules. Prior to DuckDB version 0.10.0, integer and string literals behaved identically to the INTEG
...ER and VARCHAR types. Null Literals The NULL literal is denoted with the keyword NULL . The NULL literal can be implicitly converted to any other type. Intege...r Literals Integer literals are denoted as a sequence of one or more decimal digits. At runtime, these result in values of the INTEGE...implicitly converted to a TINYINT , but the integer literal 1000 cannot be. DuckDB does not support hexadecimal or binary literals directly. However, strings or string literals in hexadecimal or binary notation with 0x or 0b prefixes respectively, can b... - https://man.mtool.work/duckdb/2.0/sql/data_types/literal_types.html
- Text Types 9414
- In DuckDB, strings can be stored in the VARCHAR field. The field allows storage of Unicode characters. Internally, the data is encoded as UTF-8. Name Aliases Description VARCHAR CHAR , BPCHAR , STRING , TEXT Variable-length character string
...constructed in one of the following ways: referencing columns whose declared or implied type is the text data type string literals casting expressions to a text type applying a string operator , or invoking a function that returns a text type value Stri...ngs with Special Characters To use special characters in a string, use escape string literals or dollar-quoted string literals . Alternatively, you can use concatenation and the chr character function : SELECT 'Hello... - https://man.mtool.work/duckdb/2.0/sql/data_types/text.html
- Functions 9138
- Function Syntax Function Chaining via the Dot Operator DuckDB supports the dot syntax for function chaining. This allows the function call fn(arg1, arg2, arg3, ...) to be rewritten as arg1.fn(arg2, arg3, ...) . For example, take the followi
..._name FROM unnest(['African goose', 'Faroese goose', 'Hungarian goose', 'Pomeranian goose']) breed(goose_name); Using with Literals and Arrays String literals and array access operations can be used with function chaining directly: SELECT 'hello world'.r...LECT m[1].map_entries() FROM (VALUES ([MAP {'hello': 42}, MAP {'world': 42}])) t(m); To apply function chaining to numeric literals, you must surround the literal with parentheses, e.g.: SELECT (2).sqrt(); In the absence of these parentheses (e.g., SELEC... - https://man.mtool.work/duckdb/2.0/sql/functions/overview.html
- Numeric Types 8414
- Fixed-Width Integer Types The types TINYINT , SMALLINT , INTEGER , BIGINT and HUGEINT store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result
...(4 bytes) DOUBLE FLOAT8 Double precision floating-point number (8 bytes) Like for fixed-point data types, conversion from literals or casts from other datatypes to floating-point types stores inputs that cannot be represented exactly as approximations....with one exception: NaN compares equal to NaN and greater than any other floating point number. To insert these values as literals in a SQL command, you must put quotes around them, you may abbreviate Infinity as Inf , and you may use any capitalization...ay from zero. sql SELECT 2.5::DECIMAL::INTEGER AS result; -- round away from zero SELECT 2.5::INTEGER AS result; -- number literals are treated as DECIMALs text ┌────────┐ │ result │ │ int32 │ ├────────┤ │ 3 │ └────────┘ If non-default rounding logic is... - https://man.mtool.work/duckdb/2.0/sql/data_types/numeric.html
- Bitstring Type 8310
- Name Aliases Description BITSTRING BIT Variable-length strings of 1s and 0s Bitstrings are strings of 1s and 0s. The bit type data is of variable length. A bitstring value requires 1 byte for each group of 8 bits, plus a fixed amount to sto
...teral, which is a string of 1s and 0s prefixed with B : SELECT B'101010' AS b; b 101010 New Starting with DuckDB 2.0, B'…' literals are BITSTRING values. In earlier versions, B'0101' was parsed as the VARCHAR string 'b0101' . Creating a BITSTRING with a... - https://man.mtool.work/duckdb/2.0/sql/data_types/bitstring.html
- Blob Type 8259
- Name Aliases Description BLOB BYTEA , BINARY , VARBINARY Variable-length binary data The blob ( B inary L arge OB ject) type represents an arbitrary binary object stored in the database system. The blob type can contain any type of binary d
...st be even. For example, create a BLOB value with two bytes (202, 254): SELECT X'CAFE'; New Starting with DuckDB 2.0, X'…' literals are BLOB values. In earlier versions, X'CAFE' was parsed as the VARCHAR string 'xCAFE' . Blobs are typically used to store... - https://man.mtool.work/duckdb/2.0/sql/data_types/blob.html
- Friendly SQL 8259
- DuckDB offers several advanced SQL features and syntactic sugar to make SQL queries more concise. We refer to these colloquially as “friendly SQL”. Several of these features were first introduced by DuckDB, while some are inspired by other
...e Using VALUES in the anchor part of common table expressions SWITCH statements as syntactic sugar for the CASE expression Literals and Identifiers Case-insensitivity while maintaining case of entities in the catalog Deduplicating identifiers Underscores...as digit separators in numeric literals Data Types MAP data type UNION data type Data Import Auto-detecting the headers and schema of CSV files Directly querying... - https://man.mtool.work/duckdb/2.0/sql/dialect/friendly_sql.html
- Boolean Type 8207
- Name Aliases Description BOOLEAN BOOL Logical Boolean ( true / false ) The BOOLEAN type represents a statement of truth (“true” or “false”). In SQL, the BOOLEAN field can also have a third state “unknown” which is represented by the SQL NUL
...possible values of a BOOLEAN column: SELECT true, false, NULL::BOOLEAN; Boolean values can be explicitly created using the literals true and false . However, they are most often created as a result of comparisons or conjunctions. For example, the compari... - https://man.mtool.work/duckdb/2.0/sql/data_types/boolean.html
- Typecasting 8207
- Typecasting is an operation that converts a value in one particular data type to the closest corresponding value in another data type. Like other SQL engines, DuckDB supports both implicit and explicit typecasting. Explicit Casting Explicit
...original type after being converted into text. SELECT CAST(CAST([1, 2, 3] AS VARCHAR) AS INTEGER[]); Literal Types Integer literals (such as 42 ) and string literals (such as 'string' ) have special implicit casting rules. See the literal types page for... - https://man.mtool.work/duckdb/2.0/sql/data_types/typecasting.html
- Pragmas 8035
- The PRAGMA statement is a SQL extension adopted by DuckDB from SQLite. PRAGMA statements can be issued in a similar manner to regular SQL statements. PRAGMA commands may alter the internal state of the database engine, and can influence the
...on to ASCENDING or DESCENDING : SET default_order = 'ASCENDING'; SET default_order = 'DESCENDING'; Ordering by Non-Integer Literals By default, ordering by non-integer literals is not allowed: SELECT 42 ORDER BY 'hello world'; -- Binder Error: ORDER BY n... - https://man.mtool.work/duckdb/2.0/configuration/pragmas.html
DuckDB 2.0 Documentation / man.mtool.work