Results of 1 - 10 of about 36 for Rules (0.002 sec.)
- Keywords and Identifiers 12552
- Identifiers Similarly to other SQL dialects and programming languages, identifiers in DuckDB's SQL are subject to several rules. Unquoted identifiers need to conform to a number of rules: They must not be a reserved keyword (see duckdb_keyw
...""X""" . New As of DuckDB 2.0, identifiers can also be quoted using backtick characters ( ` ), following exactly the same rules as double-quoted identifiers. A backtick is escaped by doubling it, e.g., `a b `` denotes the identifier `` a b `. Backtic...data structure. In these cases, DuckDB automatically deduplicates column names by renaming them according to the following rules: For a column named ⟨name⟩ , the first instance is not renamed. Subsequent instances are renamed to ⟨name⟩_⟨count⟩ , where...how to change the search path, see Name Qualification on the ATTACH page. Database Names Database names are subject to the rules for identifiers . Additionally, it is best practice to avoid DuckDB's two internal database schema names , system and temp... - https://man.mtool.work/duckdb/2.0/sql/dialect/keywords_and_identifiers.html
- Collations 11696
- Collations provide rules for how text should be sorted or compared in the execution engine. Collations are useful for localization, as the rules for how text should be ordered are different for different languages or for different countries
...HÄNNES ICU Collations The collations we have seen so far are not region-dependent, and do not follow any specific regional rules. If you wish to follow the rules of a specific region or language, you will need to use one of the ICU collations. For tha...ations would be used before. They can also be combined with the NOCASE collation. For example, to use the German collation rules you could use the following code snippet: CREATE TABLE strings (s VARCHAR COLLATE DE); INSERT INTO strings VALUES ('Gabel'... - https://man.mtool.work/duckdb/2.0/sql/expressions/collations.html
- Data Types 11015
- General-Purpose Data Types The table below shows all the built-in general-purpose data types. The alternatives listed in the aliases column can be used to refer to these types as well, however, note that the aliases are not part of the SQL
...P , STRUCT , TUPLE , UNION and VARIANT . Each supports different use cases and has a different structure. Name Description Rules when used in a column Build from values Define in DDL/CREATE ARRAY An ordered, fixed-length sequence of data values of the...value is self-contained with its own type information. Each row may hold a value of a different type. 42::VARIANT VARIANT Rules for Case Sensitivity The keys of MAP s are case-sensitive, while keys of UNION s and STRUCT s are case-insensitive. For ex...amples, see the Rules for Case Sensitivity section . Updating Values of Nested Types When performing updates on values of nested types, DuckDB p... - https://man.mtool.work/duckdb/2.0/sql/data_types/overview.html
- Crashes 10840
- DuckDB is thoroughly tested via an extensive test suite. However, bugs can still occur and these can sometimes lead to crashes. This page contains practical information on how to troubleshoot DuckDB crashes. Types of Crashes There are a few
...he query: PRAGMA disable_optimizer; If the query finishes successfully, then the crash was caused by one or more optimizer rules. To pinpoint the specific rules that caused the crash, you can try to selectively disable optimizer rules . This way, your...query can still benefit from the rest of the optimizer rules. Try to Isolate the Issue Some issues are caused by the interplay of different components and extensions, or are specific... - https://man.mtool.work/duckdb/2.0/guides/troubleshooting/crashes.html
- Typecasting 10491
- 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
...T CAST(3.1 AS INTEGER); -- 3 SELECT CAST(3.5 AS INTEGER); -- 4 SELECT CAST(-1.7 AS INTEGER); -- -2 The applicable rounding rules can be found on the NUMERIC type page . Overflows Casting operations that would result in a value overflow throw an error....GER[]); Literal Types Integer literals (such as 42 ) and string literals (such as 'string' ) have special implicit casting rules. See the literal types page for more information. Lists / Arrays Lists can be explicitly cast to other lists using the sam...e casting rules. The cast is applied to the children of the list. For example, if we convert an INTEGER[] list to a VARCHAR[] list, the ch... - https://man.mtool.work/duckdb/2.0/sql/data_types/typecasting.html
- Timestamp Types 9461
- Timestamps represent points in time. As such, they combine DATE and TIME information. They can be created using the type name followed by a string formatted according to the ISO 8601 format, YYYY-MM-DD hh:mm:ss[.zzzzzzzzz][+-TT[:tt]] , whic
...MESTAMP WITHOUT TIME ZONE stores the same INT64 , but arithmetic, binning and string formatting follow the straightforward rules of Coordinated Universal Time (UTC) without offsets or time zones. Accordingly, TIMESTAMP s could be interpreted as UTC ti...2001-02-16 03:38:40 Note that TIMESTAMP s are displayed without time zone specification in the results, following ISO 8601 rules for local times, while time-zone aware TIMESTAMPTZ s are displayed with the UTC offset of the configured time zone, which...simply applying this practice to instants; for example, by binning instants into years, months and days. Temporal binning rules are complex, and generally come in two sets: time zones and calendars . For most tasks, the calendar will just be the wide... - https://man.mtool.work/duckdb/2.0/sql/data_types/timestamp.html
- Casting 8954
- Casting refers to the operation of converting a value in a particular data type to the corresponding value in another data type. Casting can occur either implicitly or explicitly. The syntax described here performs an explicit cast. More in
...FROM generate_series(1, 3) tbl(i); i 1 2 3 SELECT i::DOUBLE AS i FROM generate_series(1, 3) tbl(i); i 1.0 2.0 3.0 Casting Rules Not all casts are possible. For example, it is not possible to convert an INTEGER to a DATE . Casts may also throw errors...will be attempted to be converted. Casting between numeric types might have rounding implications. The applicable rounding rules can be found on the NUMERIC type page . TRY_CAST TRY_CAST can be used when the preferred behavior is not to throw an error... - https://man.mtool.work/duckdb/2.0/sql/expressions/cast.html
- Map Type 8780
- MAP s are similar to STRUCT s in that they are an ordered list of key-value pairs. However, MAP s do not need to have the same keys present for each row, and thus are suitable for use cases where the schema is unknown beforehand or varies p
...ther values and are considered equal to each other. At the top level, NULL nested values obey standard SQL NULL comparison rules: comparing a NULL nested value to a non- NULL nested value produces a NULL result. Comparing nested value members , howeve...r, uses the internal nested value rules for NULL s, and a NULL nested value member will compare above a non- NULL nested value member. Functions See Map Functions... - https://man.mtool.work/duckdb/2.0/sql/data_types/map.html
- Timestamp Issues 8605
- Timestamp with Time Zone Promotion Casts Working with time zones in SQL can be quite confusing at times. For example, when filtering to a date range, one might try the following query: SET timezone = 'America/Los_Angeles'; CREATE TABLE time
...│ ├──────────────────────────┤ │ 0 rows │ └──────────────────────────┘ These confusing results are due to the SQL casting rules from DATE to TIMESTAMP WITH TIME ZONE . This cast is required to promote the date to midnight in the current time zone . I...picking out the ones in the list avoids duplicate time zone conversions. Also notice that we are leveraging the DATE cast rules from the previous section to bound the calendar to the model domain. Half-Open Intervals Another subtle problem in using S... - https://man.mtool.work/duckdb/2.0/guides/sql_features/timestamps.html
- Interval Functions 8257
- This section describes functions and operators for examining and manipulating INTERVAL values. Interval Operators The table below shows the available mathematical operators for INTERVAL types. Operator Description Example Result + Addition
...n date_part(part, interval) Extract datepart component (equivalent to extract ). See INTERVAL for the sometimes surprising rules governing this extraction. datepart(part, interval) Alias of date_part . extract(part FROM interval) Alias of date_part ...., interval) | Description | Extract datepart component (equivalent to extract ). See INTERVAL for the sometimes surprising rules governing this extraction. | | Example | date_part('year', INTERVAL '14 months') | | Result | 1 | datepart(part, interval)... - https://man.mtool.work/duckdb/2.0/sql/functions/interval.html
DuckDB 2.0 Documentation / man.mtool.work