⌘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 20 for parentheses (0.002 sec.)
CREATE MACRO Statement 14036
The CREATE MACRO statement defines a named, callable SQL expression as a database schema object. Macros may declare parameters, which can be referenced by its expression. Once a macro is created, it may be called by referencing its name and ... ready exist. Either the OR REPLACE or the IF NOT EXISTS clause may be present, but not both. The macro name is followed by parentheses. If the macro has parameters , then they must be declared within the parentheses. The AS keyword appears after the right p ... eclaring Parameters Macros may declare parameters. The parameter declarations appear as a comma-separated list between the parentheses before the AS keyword. The simplified syntax for a single parameter declaration is: ⟨parameter-name⟩ [⟨datatype⟩] [ := ⟨de ... functions that are defined using a SELECT statement as expression, you will probably need to wrap the SELECT statement in parentheses. Calling Macros Macros are called by mentioning their name, followed by parentheses. A comma-separated list of value-expre ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_macro.html
CREATE INDEX Statement 10892
CREATE INDEX The CREATE INDEX statement constructs an index on the specified column(s) of the specified table. Examples Create a unique index films_id_idx on the column id of table films : CREATE UNIQUE INDEX films_id_idx ON films (id); Cre ... xpression An expression based on one or more columns of the table. The expression usually must be written with surrounding parentheses, as shown in the syntax. However, the parentheses can be omitted if the expression has the form of a function call. index ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_index.html
Functions 10468
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 ... 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., SELECT 2.sqrt(); ), DuckDB returns a Parser Error for ...
https://man.mtool.work/duckdb/2.0/sql/functions/overview.html
Time Functions 10264
This section describes functions and operators for examining and manipulating TIME values . Time Operators The table below shows the available mathematical operators for TIME types. Operator Description Example Result + addition of an INTER ... as a TIME value without a time zone. | | Example | current_localtime() | | Result | 06:09:59.988 | | Alias | localtime (no parentheses necessary) | date_diff(part, starttime, endtime) | Description | The number of part boundaries between starttime and endti ... the local time zone as TIMETZ . | | Example | get_current_time() | | Result | 06:09:59.988+2 | | Alias | current_time (no parentheses necessary) | make_time(bigint, bigint, double) | Description | The time for the given parts. | | Example | make_time(13, 3 ...
https://man.mtool.work/duckdb/2.0/sql/functions/time.html
Numeric Functions 9006
Numeric Operators The table below shows the available mathematical operators for numeric types . Operator Description Example Result + Addition 2 + 3 5 - Subtraction 2 - 3 -1 * Multiplication 2 * 3 6 / Float division 5 / 2 2.5 // Division 5 ... types. Numeric Functions The table below shows the available mathematical functions. Name Description @(x) Absolute value. Parentheses are optional if x is a column name. abs(x) Absolute value. acos(x) Computes the inverse cosine of x . acosh(x) Computes th ... s the hyperbolic tangent of x . trunc(x) Truncates the number. xor(x, y) Bitwise XOR. @(x) | Description | Absolute value. Parentheses are optional if x is a column name. | | Example | @(-17.4) | | Result | 17.4 | | Alias | abs | abs(x) | Description | Abso ... earlier versions. For example, SELECT 2 * 3!; now returns 12 ( 2 * (3!) ), while in v1.5 it returned 720 ( (2 * 3)! ). Use parentheses to get the old behavior, e.g., SELECT (2 * 3)!; . fdiv(x, y) | Description | Performs integer division ( x // y ) using th ...
https://man.mtool.work/duckdb/2.0/sql/functions/numeric.html
COPY Statement 8598
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 ... json' (FORMAT json, ARRAY true); An expression may be used as the source of a COPY ... FROM command if 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 = 'linei ... for name.field1 and name.field2 . An expression may be used as the target of a COPY ... TO command if it is placed within parentheses. Copy the result of a query to a file whose path is stored in a variable: SET VARIABLE target_file = 'target_file.parquet' ... ons may be provided as a part of the copy operation. The WITH specifier is optional, but if any options are specified, the parentheses are required. Parameter values can be passed in with or without wrapping in single quotes. Arbitrary expressions may be us ...
https://man.mtool.work/duckdb/2.0/sql/statements/copy.html
Struct Data Type 8377
Conceptually, a STRUCT column contains an ordered list of columns called “entries”. The entries are referenced by name using strings. This document refers to those entry names as keys. Each row in the STRUCT column must have the same keys. ... with no arguments returns {} (whereas row() with no arguments returns the empty tuple () ). Note that STRUCT() with empty parentheses remains a syntax error, and unnest and struct_extract raise an error on an empty struct. Persisting an empty struct into a ... ed by their (1-based) position. Tuples are created using the row function or, if there are at least two expressions, using parentheses: SELECT row(x, x + 1, y) AS t FROM (SELECT 1 AS x, 'a' AS y) AS s; ┌──────────────────────────────────┐ │ t │ │ tuple(inte ...
https://man.mtool.work/duckdb/2.0/sql/data_types/struct.html
DuckDB_% Metadata Functions 8377
DuckDB offers a collection of table functions that provide metadata about the current database. These functions reside in the main schema and their names are prefixed with duckdb_ . The resultset returned by a duckdb_ table function may be ... set elsewhere in the statement, for example in the WHERE clause. Table functions are still functions, and you should write parentheses after the function name to call it to obtain its returned resultset: SELECT * FROM duckdb_settings(); Alternatively, you m ... ay execute table functions also using the CALL -syntax: CALL duckdb_settings(); In this case too, the parentheses are mandatory. For some of the duckdb_% functions, there is also an identically named view available, which also resides i ... e, while filtering out those objects that are marked as internal. We mention it here, because if you accidentally omit the parentheses in your duckdb_ table function call, you might still get a result, but from the identically named view. Example: The duckd ...
https://man.mtool.work/duckdb/2.0/sql/meta/duckdb_table_functions.html
JSON Processing Functions 7970
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 ... tracts, has a low precedence as it is also used in lambda functions . Therefore, you need to surround the -> operator with parentheses when expressing operations such as equality comparisons ( = ). For example: SELECT ((JSON '{"field": 42}')->'field') = 42; ... ators bind more tightly than AND and OR , so an extraction can be combined with other conditions in a WHERE clause without parentheses: SELECT count(*) FROM (VALUES ('{}'::JSON)) t(j) WHERE 1 = 1 AND j->>'field' IS NOT NULL; Warning DuckDB's JSON data type ...
https://man.mtool.work/duckdb/2.0/data/json/json_functions.html
SQL Quirks 7970
Like all programming languages and libraries, DuckDB has its share of idiosyncrasies and inconsistencies. Some are vestiges of our feathered friend's evolution; others are inevitable because we strive to adhere to the SQL Standard and speci ... 4.0 PostgreSQL compatibility means the unary minus has higher precedence than the exponentiation operator. Use additional parentheses, e.g., -(2^2) or the pow function , e.g., -pow(2, 2) , to avoid mistakes. 't' = true true Compatible with PostgreSQL. 1 = ...
https://man.mtool.work/duckdb/2.0/sql/dialect/sql_quirks.html
PREV 1 2 NEXT
DuckDB 2.0 Documentation / man.mtool.work