⌘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 17 for conditions (0.002 sec.)
MERGE INTO Statement 12638
The MERGE INTO statement is an alternative to INSERT INTO ... ON CONFLICT that doesn't need a primary key since it allows for a custom match condition. This is a very useful alternative for upserting use cases ( INSERT + UPDATE ) when the d ... THEN DELETE; FROM people ORDER BY id; id name salary 2 Anna 100000.0 3 Sarah 95000.0 MERGE INTO also supports more complex conditions, for example, for a given delete set we can decide to only remove rows that contain a salary bigger or equal than a certai ... DELETE; FROM people ORDER BY id; id name salary 3 Sarah 95000.0 If needed, DuckDB also supports multiple UPDATE and DELETE conditions. The RETURNING clause can be used to indicate which rows were affected by the MERGE statement. -- Let's get John back in! ... HED BY TARGET . However, the behavior is, as you may expect, the same as WHEN NOT MATCHED since by default when specifying conditions, we look at the target. Multiple Matching Source Rows A MERGE INTO statement may not affect the same target row more than ...
https://man.mtool.work/duckdb/2.0/sql/statements/merge_into.html
CASE Expression 11673
The CASE expression performs a switch based on a condition. The basic form is identical to the ternary condition used in many programming languages ( CASE WHEN cond THEN a ELSE b END is equivalent to cond ? a : b ). With a single condition ... > 2, 1, 0) AS test FROM integers; The WHEN cond THEN expr part of the CASE expression can be chained, whenever any of the conditions returns true for a single tuple, the corresponding expression is evaluated and returned. CREATE OR REPLACE TABLE integers ... rs; i test 1 10 2 20 3 0 The ELSE clause of the CASE expression is optional. If no ELSE clause is provided and none of the conditions match, the CASE expression will return NULL . CREATE OR REPLACE TABLE integers AS SELECT unnest([1, 2, 3]) AS i; SELECT i, ...
https://man.mtool.work/duckdb/2.0/sql/expressions/case.html
FROM and JOIN Clauses 10724
The FROM clause specifies the source of the data on which the remainder of the query should operate. Logically, the FROM clause is where the query starts execution. The FROM clause can contain a single table, a combination of multiple table ... r table are set to NULL . Cross Product Joins (Cartesian Product) The simplest type of join is a CROSS JOIN . There are no conditions for this type of join, and it just returns all the possible pairs. Return all pairs of rows: SELECT a.*, b.* FROM a CROSS ... oins Most joins are specified by a predicate that connects attributes from one side to attributes from the other side. The conditions can be explicitly specified using an ON clause with the join (clearer) or implied by the WHERE clause (old-fashioned). We ... ny inequality condition ( >= , > , <= , < ) on any data type, but the most common form is >= on a temporal type. Any other conditions must be equalities (or NOT DISTINCT ). This means that the left/right order of the tables is significant. ASOF joins each ...
https://man.mtool.work/duckdb/2.0/sql/query_syntax/from.html
Internal Errors 10086
Internal errors signal an assertion failure within DuckDB. They usually occur due to unexpected conditions or errors in the program's logic. For example, running issue 17002 on DuckDB 1.2.1 results in an internal error. INTERNAL Error: Atte ...
https://man.mtool.work/duckdb/2.0/dev/internal_errors.html
Star Expression 9449
Syntax The * expression can be used in a SELECT statement to select all columns that are projected in the FROM clause. SELECT * FROM tbl; TABLE.* and STRUCT.* The * expression can be prepended by a table name to select only columns from tha ... id number 2 20 4 40 6 NULL COLUMNS Expression in a WHERE Clause COLUMNS expressions can also be used in WHERE clauses. The conditions are applied to all columns and are combined using the logical AND operator. SELECT * FROM ( SELECT 'a', 'a' UNION ALL SELE ... , 'b' UNION ALL SELECT 'b', 'b' ) _(x, y) WHERE COLUMNS(*) = 'a'; -- equivalent to: x = 'a' AND y = 'a' x y a a To combine conditions using the logical OR operator, you can UNPACK the COLUMNS expression into the variadic greatest function. SELECT * FROM ( ...
https://man.mtool.work/duckdb/2.0/sql/expressions/star.html
EXPLAIN: Inspect Query Plans 8793
EXPLAIN SELECT * FROM tbl; The EXPLAIN statement displays the physical plan, i.e., the query plan that will get executed, and is enabled by prepending the query with EXPLAIN . The physical plan is a tree of operators that are executed in a ... ───────╮ │ Projections: name │ │ ~1 row │ ╰─────────────┬────────────╯ ╭─ Hash Join ─┴────────────╮ │ Join Type: INNER │ │ Conditions: sid = sid │ │ ~1 row │ ╰─────────────┬────────────╯ ├──────────────────────────────╮ ╭─ Seq Scan ──┴────────────╮ ╭─ Seq ...
https://man.mtool.work/duckdb/2.0/guides/meta/explain.html
EXPLAIN ANALYZE: Profile Queries 8793
Prepending a query with EXPLAIN ANALYZE both pretty-prints the query plan, and executes it, providing run-time performance numbers and the actual cardinality (number of rows produced) for every operator. EXPLAIN ANALYZE SELECT * FROM tbl; N ... ─────────┒┎───────────────────────────╯ ╭─ Hash Join ────────────────┚┖───────────────────────────╮ │ Join Type: INNER │ │ Conditions: sid = sid │ │ 2 rows 0µs │ ╰────────────────────────────┰┰───────────────────────────╯ ┃┠──────────────────────────────── ...
https://man.mtool.work/duckdb/2.0/guides/meta/explain_analyze.html
Command Line Client 8483
Installation To use the DuckDB CLI client, visit the CLI installation page . The latest stable version of the DuckDB command line client is 2.0.0. Installation The DuckDB CLI (Command Line Interface) is a single, dependency-free executable. ... ew progress data becomes available, improving accuracy throughout execution The Kalman filter adapts to changing execution conditions such as memory pressure, I/O bottlenecks, or network delays. This adaptive approach means estimated completion times may n ... ictable. Factors Affecting The Accuracy of Query Completion ETA Completion time estimates may be less reliable under these conditions: System resource constraints: Memory pressure causing disk swapping High CPU load from competing processes Disk I/O bottle ...
https://man.mtool.work/duckdb/2.0/clients/cli/overview.html
Indexing 7845
DuckDB has two types of indexes: zonemaps and ART indexes. Zonemaps DuckDB automatically creates zonemaps (also known as min-max indexes) for the columns of all general-purpose data types . Operations like predicate pushdown into scan opera ... tially. Probing can improve the performance of some queries. DuckDB will try to use an index scan for equality and IN(...) conditions. It also pushes dynamic filters, e.g., from hash joins, into the scan, allowing dynamic index scans on these filters. Inde ...
https://man.mtool.work/duckdb/2.0/guides/performance/indexing.html
Indexes 7845
Index Types DuckDB has two built-in index types. Indexes can also be defined via extensions . Min-Max Index (Zonemap) A min-max index (also known as zonemap or block range index) is automatically created for columns of all general-purpose d ... available in the client). Over-Eager Constraint Checking in Foreign Keys This limitation occurs if you meet the following conditions: A table has a FOREIGN KEY constraint. There is an UPDATE on a composite payload column (e.g., a LIST or a STRUCT ), the c ...
https://man.mtool.work/duckdb/2.0/sql/indexes.html
PREV 1 2 NEXT
DuckDB 2.0 Documentation / man.mtool.work