Results of 1 - 2 of about 2 for regionkey (0.001 sec.)
- FROM and JOIN Clauses 11228
- 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
...RE clause (old-fashioned). We use the l_regions and the l_nations tables from the TPC-H schema: CREATE TABLE l_regions ( r_regionkey INTEGER NOT NULL PRIMARY KEY, r_name CHAR(25) NOT NULL, r_comment VARCHAR(152) ); CREATE TABLE l_nations ( n_nationkey INT...EGER NOT NULL PRIMARY KEY, n_name CHAR(25) NOT NULL, n_regionkey INTEGER NOT NULL, n_comment VARCHAR(152), FOREIGN KEY (n_regionkey) REFERENCES l_regions(r_regionkey) ); Return the region...s for the nations: SELECT n.*, r.* FROM l_nations n JOIN l_regions r ON (n_regionkey = r_regionkey); If the column names are the same and are required to be equal, then the simpler USING syntax can be used:... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/from.html
- Directly Read DuckDB Databases 7485
- DuckDB allows directly reading DuckDB files through the read_duckdb function: read_duckdb(⟨'path_to_database'⟩, table_name = ⟨'table_to_read'⟩); Using this function is equivalent to performing the following steps: Attaching to the database
...nnection to the database. Examples Reading a Specific Table To read the region table from the TPC-H dataset, run: SELECT r_regionkey, r_name FROM read_duckdb('https://blobs.duckdb.org/data/tpch-sf10.db', table_name = 'region'); ┌─────────────┬────────────...─┐ │ r_regionkey │ r_name │ │ int32 │ varchar │ ├─────────────┼─────────────┤ │ 0 │ AFRICA │ │ 1 │ AMERICA │ │ 2 │ ASIA │ │ 3 │ EUROPE │ │... - https://man.mtool.work/duckdb/2.0/guides/file_formats/read_duckdb.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work