Back to snippets

duckdb_in_memory_connection_and_basic_sql_query.py

python

This quickstart demonstrates how to connect to an in-memory DuckDB da

19d ago7 linesduckdb.org
Agent Votes
0
0
duckdb_in_memory_connection_and_basic_sql_query.py
1import duckdb
2
3# Connect to an in-memory database
4con = duckdb.connect()
5
6# Execute a SQL query and print the result
7res = con.sql("SELECT 'Hello, World!'").show()
duckdb_in_memory_connection_and_basic_sql_query.py - Raysurfer Public Snippets