This page contains installation options for DuckDB. We recommend using the stable release, 1.0.0.
Binaries are available for major programming languages and platforms. If there are no pre-packaged binaries available, consider building DuckDB from source.
Note: DuckDB clients are installed without relying on any other DuckDB clients.
For example, the Python library can use a different version than the CLI client.
Therefore, they need to be updated separately.
Note: DuckDB clients are installed without relying on any other DuckDB clients.
For example, the Python library can use a different version than the CLI client.
Therefore, they need to be updated separately.
library("DBI")con=dbConnect(duckdb::duckdb(),":memory:")dbWriteTable(con,"iris",iris)dbGetQuery(con,'SELECT "Species", MIN("Sepal.Width") FROM iris GROUP BY "Species"')
varduckdb=require('duckdb');vardb=newduckdb.Database(':memory:');// or a file name for a persistent DBdb.all('SELECT 42 AS fortytwo',function(err,res){if(err){console.warn(err);return;}console.log(res[0].fortytwo)});
useduckdb::{Connection,Result};#[derive(Debug)]structPerson{id:i32,name:String,}fnmain()->Result<()>{letconn=Connection::open_in_memory()?;conn.execute_batch(r"CREATE TABLE person (id BIGINT, name VARCHAR);
INSERT INTO person VALUES (42, 'John');
")?;letmutstmt=conn.prepare("SELECT id, name FROM person")?;letperson_iter=stmt.query_map([],|row|{Ok(Person{id:row.get(0)?,name:row.get(1)?})})?;forpersoninperson_iter{println!("Found person {:?}",person.unwrap());}Ok(())}
packagemainimport("database/sql""fmt"_"github.com/marcboeker/go-duckdb")funcmain(){db,_:=sql.Open("duckdb","")db.Exec(`CREATE TABLE person (id INTEGER, name VARCHAR)`)db.Exec(`INSERT INTO person VALUES (42, 'John')`)var(idintnamestring)row:=db.QueryRow(`SELECT id, name FROM person`)_=row.Scan(&id,&name)fmt.Println("id:",id,"name:",name)}