⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 36 for zero in (0.003 sec.)
zero (36), in (411)
Date Format Functions 19039
The strftime and strptime functions can be used to convert between DATE / TIMESTAMP values and strings. This is often required when parsing CSV files, displaying output to the user or transferring information between programs. Because there ... are many possible date representations, these functions accept a format string that describes how the date or timestamp should be structured. strftime Examples The strftime(timestamp, format) converts ... timestamps or dates to strings according to the specified pattern. SELECT strftime(DATE '1992-03-02', '%d/%m/%Y'); 02/03/1992 SELECT strftime(TIMESTAMP ... B Full month name. January, February, ... %c ISO date and time representation 1992-03-02 10:30:20 %d Day of the month as a zero-padded decimal. 01, 02, ..., 31 %-d Day of the month as a decimal number. 1, 2, ..., 30 %f Microsecond as a decimal number ...
https://man.mtool.work/duckdb/2.0/sql/functions/dateformat.html
TRY Expression 16414
The TRY expression ensures that errors caused by the input rows in the child (scalar) expression result in NULL for those rows, instead of causing the query to throw an error. The TRY expression was inspired by the TRY_CAST expression . Exa ... mples The following calls return errors when invoked without the TRY expression. When they are wrapped into a TRY expression, they return NUL ... L : Casting Without TRY SELECT 'abc'::INTEGER; Conversion Error: Could not convert string 'abc' to INT32 With TRY SELECT TRY('abc'::I ... NTEGER); NULL Integer Division by Zero Without TRY SELECT 1 // 0; Invalid Input Error: Division by zero in expression (1 // 0). Use TRY(...) to return NULL for t ...
https://man.mtool.work/duckdb/2.0/sql/expressions/try.html
Pragmas 15013
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 ... subsequent execution or behavior of the engine. Configure DuckDB settings using the SET statement . You can retrieve a setting's value using SELECT current_setting('opt ... ion_name') . Deprecated Assigning configuration settings with PRAGMA name = value is deprecated and emits a warning. Use SET name = value instead. The warn ... cs. If you would like to turn this off, run: SET ieee_floating_point_ops = false; In this case, floating point division by zero (e.g., 1.0 / 0.0 , 0.0 / 0.0 and -1.0 / 0.0 ) throws an error. To return NULL instead, also set error_on_division_by_zero ...
https://man.mtool.work/duckdb/2.0/configuration/pragmas.html
Migrating to DuckDB 2.0 14853
DuckDB 2.0.0 is packed with new features and performance improvements, including query optimization and asynchronous I/O. It also ships a small set of breaking changes, most notably a new default storage format, which DuckDB versions before ... 2.0.0 cannot read, and the next step of the lambda syntax transition. This page provides guidance on migrating existing deployments to DuckDB 2.0.0. Before You Migrate Before migrating to DuckDB 2.0.0, assess whether your workload i ... s mission-critical. For such workloads, consider waiting for upcoming patch releases, which address issues that surface shortly after a major release. To help facilitate this, th ... tom build, note that ICU is no longer bundled. If you find that ICU's behavior changed, please file an issue . Division by Zero Integer division ( // ) and modulo ( % ) by zero, e.g., 1 // 0 and 1 % 0 , now throw an error instead of returning NULL : ...
https://man.mtool.work/duckdb/2.0/operations_manual/migration.html
PostgreSQL Compatibility 14204
DuckDB's SQL dialect closely follows the conventions of the PostgreSQL dialect. The few exceptions to this are listed on this page. Floating-Point Arithmetic DuckDB and PostgreSQL handle floating-point arithmetic differently for division by ... zero. DuckDB conforms to the IEEE Standard for Floating-Point Arithmetic (IEEE 754) for both division by zero and operations in ... volving infinity values. PostgreSQL returns an error for division by zero but aligns with IEEE 754 for handling infinity values. ... To show the differences, run the following SQL queries: SELECT 1.0 / 0.0 AS x; SELECT 0.0 / 0.0 AS x; SELECT -1.0 / 0.0 AS x; SELECT 'Infinity'::FLOAT / 'Infinity': ...
https://man.mtool.work/duckdb/2.0/sql/dialect/postgresql_compatibility.html
Aggregate Functions 13915
Examples Produce a single row containing the sum of the amount column: SELECT sum(amount) FROM sales; Produce one row per unique region, containing the sum of amount for each group: SELECT region, sum(amount) FROM sales GROUP BY region; Ret ... urn only the regions that have a sum of amount higher than 100: SELECT region FROM sales GROUP BY region HAVING sum(amount) > 100; Return the number of unique values in the region column: SELECT count(DISTINCT region) FROM sales; Ret ... urn two values, the total sum of amount and the sum of amount minus columns where the region is north using the FILTER clause : SELECT sum(amount), sum(amount) FILTER (region != 'north') F ... functions except count return NULL on empty groups. In particular, list does not return an empty list, sum does not return zero, and string_agg does not return an empty string in this case. General Aggregate Functions The table below shows the availa ...
https://man.mtool.work/duckdb/2.0/sql/functions/aggregates.html
Bitstring Functions 13898
This section describes functions and operators for examining and manipulating BITSTRING values. Bitstrings must be of equal length when performing the bitwise operands AND, OR and XOR. When bit shifting, the original length of the string is ... preserved. Bitstring Operators The table below shows the available mathematical operators for BIT type. Operator Description Example Result & ... Bitwise AND '10101'::BITSTRING & '10001'::BITSTRING 10001 | Bitwise OR '1011'::BITSTRING | '0001'::BITSTRING 1011 xor Bitwise XOR xor('101'::BITSTRING, ... the bitstring. bit_position(substring, bitstring) Returns first starting index of the specified substring within bits, or zero if it's not present. The first (leftmost) bit is indexed 1. bitstring(bitstring, length) Returns a bitstring of determined ...
https://man.mtool.work/duckdb/2.0/sql/functions/bitstring.html
PostgreSQL Extension Functions 13601
postgres_clear_cache postgres_configure_pool postgres_execute postgres_hstore_get postgres_hstore_to_json postgres_query read_postgres_binary postgres_clear_cache postgres_clear_cache() -> TABLE Clears cached schema entries (like table name ... s with column lists) for all attached PostgreSQL catalogs. Attached schema is going to be re-read on the next access. Parameters None. Returns A table with the following columns: Success ( BOOLEAN ): a fla ... g whether the cache clearing was successful Currently the table result is always returned with zero rows, so the flag value is not available. Example ... s the connection which exceed the specified values. Either max_lifetime_millis or idle_timeout_millis must be set to a non-zero value for this option to be effective. health_check_query ( VARCHAR ): the query that is used to check that the connection ...
https://man.mtool.work/duckdb/2.0/core_extensions/postgres/functions.html
Numeric Types 13533
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 ... in an error. The types UTINYINT , USMALLINT , UINTEGER , UBIGINT and UHUGEINT store whole unsigned numbers. Attempts to store negative numbers or valu ... es outside of the allowed range will result in an error. Name Aliases Min Max Size in bytes TINYINT INT1 - 2^7 2^7 - 1 1 SMALLINT INT2 , INT16 , SHORT - 2^15 2^15 - 1 2 ... ges (and negative numbers outside the mirrored ranges) may cause errors on some platforms but will usually be converted to zero or infinity, respectively. In addition to ordinary numeric values, the floating-point types have several special values re ...
https://man.mtool.work/duckdb/2.0/sql/data_types/numeric.html
Configuration 13164
DuckDB has a number of configuration options that can be used to change the behavior of the system. The configuration options can be set using either the SET statement or the PRAGMA statement . They can be reset to their original values usin ... ng the RESET statement . The values of configuration options can be queried via the current_setting() scalar function or using the duckdb_settings() table function . For example: SELECT current_setting('memory_limit') AS ... memlimit; Or: SELECT value AS memlimit FROM duckdb_settings() WHERE name = 'memory_limit'; Examples Set the memory limit of the system to 10 GB. SET memory_limit = '10GB'; Configur ... objects, such as tables. BOOLEAN false enabled_log_types Sets the list of enabled log types. VARCHAR error_on_division_by_zero Throw an error instead of returning NULL when dividing by zero. BOOLEAN true errors_as_json Output error messages as struc ...
https://man.mtool.work/duckdb/2.0/configuration/overview.html
PREV 1 2 3 4 NEXT
DuckDB 2.0 Documentation / man.mtool.work