⌘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 25 for original SET (0.004 sec.)
original (31), set (235)
UPDATE Statement 24022
The UPDATE statement modifies the values of rows in a table. Examples For every row where i is NULL , set the value to 0 instead: UPDATE tbl SET i = 0 WHERE i IS NULL; Set all values of i to 1 and all values of j to 2: UPDATE tbl SET i = 1, ... of the specified columns in all rows that satisfy the condition. Only the columns to be modified need be mentioned in the SET clause; columns not explicitly modified retain their previous values. RETURNING Clause The RETURNING clause returns the va ... e of the rows after the update. CREATE TABLE tbl (i INTEGER, j INTEGER); INSERT INTO tbl VALUES (0, 1), (1, 2); UPDATE tbl SET j = j + 10 WHERE i = 1 RETURNING *; i j 1 12 Update from Other Table A table can be updated based upon values from another ... approaches have the benefit of completing the UPDATE operation in bulk for increased performance. CREATE OR REPLACE TABLE original AS SELECT 1 AS key, 'original value' AS value UNION ALL SELECT 2 AS key, 'original value 2' AS value; CREATE OR REPLACE TA ...
https://man.mtool.work/duckdb/2.0/sql/statements/update.html
Regular Expressions 15693
DuckDB offers pattern matching operators ( LIKE , SIMILAR TO , GLOB ), as well as support for regular expressions via functions. Regular Expression Syntax DuckDB uses the RE2 library as its regular expression engine. For the regular express ... ion syntax, see the RE2 docs . Functions All functions accept an optional set of options . Name Description regexp_extract(string, pattern[, group = 0][, options]) If string contains the regexp patter ... group ; otherwise, returns the empty string. The group must be a constant value. If no group is given, it defaults to 0. A set of optional options can be set. regexp_extract(string, pattern, name_list[, options]) If string contains the regexp patter ... e matching) should be passed if applicable. Note that by default the RE2 library doesn't match the . character to newline. Original Optimized equivalent regexp_matches('hello world', '^hello', 'c') prefix('hello world', 'hello') regexp_matches('hello wor ...
https://man.mtool.work/duckdb/2.0/sql/functions/regular_expressions.html
Configuration 14524
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 usi ... ng the RESET statement . The values of configuration options can be queried via the current_setting() scalar function or using the duck ... db_settings() table function . For example: SELECT current_setting('memory_limit') AS memlimit; Or: SELECT value AS memlimit FROM ...
https://man.mtool.work/duckdb/2.0/configuration/overview.html
Reading Faulty CSV Files 14471
CSV files can come in all shapes and forms, with some presenting many errors that make the process of cleanly reading them inherently difficult. To help users read these files, DuckDB supports detailed error messages, the ability to skip fa ... columns than expected. In our example, we expect two columns; therefore, a row with just one value, e.g., Pedro , would cause this error. TOO MANY COLUMNS : This error occurs if a line in the CSV has more columns than expected. In our example, any l ... ine with more than two columns would cause this error, e.g., Pedro,01-01-1992,pdet . UNQUOTED VALUE : Quoted values in CSV lines must always be unquoted at the end; i ... te them directly in their CSV file. This is an example for a full error message: Conversion Error: CSV Error on Line: 5648 Original Line: Pedro,The 90s Error when converting column "birth_date". date field value out of range: "The 90s", expected format i ...
https://man.mtool.work/duckdb/2.0/data/csv/reading_faulty_csv_files.html
Bitstring Functions 13957
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 ... table below shows the available scalar functions for BIT type. Name Description bit_count(bitstring) Returns the number of set bits in the bitstring. bit_length(bitstring) Returns the number of bits in the bitstring. bit_position(substring, bitstrin ... indexed 0. length(bitstring) Alias for bit_length . octet_length(bitstring) Returns the number of bytes in the bitstring. set_bit(bitstring, index, new_value) Sets the nth bit in bitstring to newvalue; the first (leftmost) bit is indexed 0. Returns ...
https://man.mtool.work/duckdb/2.0/sql/functions/bitstring.html
Order Preservation 13661
For many operations, DuckDB preserves the order of rows, similarly to data frame libraries such as Pandas. Example Take the following table for example: CREATE TABLE tbl AS SELECT * FROM (VALUES (1, 'a'), (2, 'b'), (3, 'c')) t(x, y); SELECT ... e the following query that returns the rows where x is an odd number: SELECT * FROM tbl WHERE x % 2 == 1; x y 1 a 3 c Because the row (1, 'a') occurs before (3, 'c') in the original table, it is guaranteed to come before that row in this table too. ... Clauses The following clauses guarantee that the original row order is preserved: COPY (see Insertion Order ) FROM with a single table LIMIT OFFSET SELECT UNION ALL WHERE Window fu ... nd table subqueries as long as they only contain the aforementioned components Tip row_number() OVER () allows turning the original row order into an explicit column that can be referenced in the operations that don't preserve row order by default. On ma ...
https://man.mtool.work/duckdb/2.0/sql/dialect/order_preservation.html
COPY Statement 13358
Examples Read a CSV file into the lineitem table, using auto-detected CSV options: COPY lineitem FROM 'lineitem.csv'; Read a CSV file into the lineitem table, using manually specified CSV options: COPY lineitem FROM 'lineitem.csv' (DELIMITE ... t of columns in the table tbl , and the contents of the columns must be convertible to the column types of the table. In case this is not possible, an error will be thrown. If a list of columns is specified, COPY will only copy the data in the speci ... f it is placed within parentheses. Read the contents of a file whose path is stored in a variable into the lineitem table: SET VARIABLE source_file = 'lineitem.json'; COPY lineitem FROM (getvariable('source_file')); Read the contents of a file provi ... functions can be added by extensions . VARCHAR auto USE_TMP_FILE Whether or not to write to a temporary file first if the original file exists ( target.csv.tmp ). This prevents overwriting an existing file with a broken file in case the writing is cance ...
https://man.mtool.work/duckdb/2.0/sql/statements/copy.html
Spatial Functions 13147
Function Index Scalar Functions Function Summary DuckDB_PROJ_Compiled_Version Returns a text description of the PROJ library version that this instance of DuckDB was compiled against. DuckDB_Proj_Version Returns a text description of the PR ... er dictates the level of concavity; 1.0 returns the convex hull; and 0 indicates to return the most concave hull possible. Set allowHoles to a non-zero value to allow output containing holes. ST_Contains Returns true if the first geometry contains t ... an ellipsoidal model of the earths surface ST_Dump Dumps a geometry into a list of sub-geometries and their "path" in the original geometry. ST_EndPoint Returns the end point of a LINESTRING. ST_Envelope Returns the minimum bounding rectangle of a geome ... urns the minimum Z coordinate of a geometry Aggregate Functions Function Summary ST_AsMVT Make a Mapbox Vector Tile from a set of geometries and properties ST_CoverageInvalidEdges_Agg Returns the invalid edges of a coverage geometry ST_CoverageSimpl ...
https://man.mtool.work/duckdb/2.0/core_extensions/spatial/functions.html
Python Client API 12614
Connection class duckdb. Appender Bases: object append_row ( self , * args ) → None Buffer one row, one value per column, each converted as an executemany parameter would be append_rows ( self , rows : object ) → None Buffer each row of an ... zes data in the write-ahead log (WAL) to the database data file (no-op for in-memory connections) close ( self ) → None Close the connection commit ( self ) → _duckdb.DuckDBPyConnection Commit changes performed within a transaction complete ( self ) ... le : int ) → _duckdb._sqltypes.DuckDBPyType Create a decimal type with ‘width' and ‘scale' property description Get result set attributes, mainly column names df ( self , * , date_as_object : bool = False ) → object Fetch a result as DataFrame follo ... groups : str = '' ) → DuckDBPyRelation Computes the number of elements present in a given expression, also projecting the original expression. Detailed examples can be found at Relational API page . var ( expression : str , groups : str = '' , window_sp ...
https://man.mtool.work/duckdb/2.0/clients/python/reference/
JSON Processing Functions 12540
JSON Extraction Functions There are two extraction functions, which have their respective operators. The operators can only be used if the string is stored as the JSON logical type. These functions support the same two location notations as ... ple values need to be extracted from the same JSON, it is more efficient to extract a list of paths: The following will cause the JSON to be parsed twice: Resulting in a slower query that uses more memory: SELECT json_extract(j, 'family') AS family, ... presented in JSON. If you feed this structure back into from_json , these columns are produced as VARCHAR . To recover the original types, replace the relevant "VARCHAR" entries in the structure with the desired type name, for example "DATE" . SELECT jso ... uments into json , applied left to right. Works like json_merge_patch , except that a JSON null value in a patch keeps the original value instead of deleting the key. A SQL NULL patch returns NULL , while a SQL NULL json is ignored. json_merge_patch_diff ...
https://man.mtool.work/duckdb/2.0/data/json/json_functions.html
PREV 1 2 3 NEXT
DuckDB 2.0 Documentation / man.mtool.work