🗃️ AI SQL functions
6 items
📄️ ATTACH <database>
A local database can be attached in order to access local data, and a remote MotherDuck database that a user has created and has previously detached may be re-attached.
📄️ ATTACH <share>
In MotherDuck you can share databases with others by generating a share, during which a URL is generated. You can send the URL to users you want to share the database with. It will be output with the CREATE SHARE statement or LIST SHARES.
📄️ CREATE DATABASE
The CREATE DATABASE statement creates a new database in MotherDuck. It can be used to either copy entire databases into MotherDuck from your local environment, or to zero-copy clone databases inside of MotherDuck.
📄️ CREATE SHARE
The CREATE SHARE statement creates a new a share from a database. This statement returns a share URL for users to pass on to others. This command is used to share databases with other users.
📄️ DESCRIBE SHARE
The DESCRIBE SHARE statement is used to get details about a specific share.
📄️ DETACH <database>
After a database has been created, it can be detached.
📄️ DETACH <share>
Attached shares are sticky, and will continue to appear in your catalog unless you explicitly detach them with:
📄️ DROP SHARE
DROP SHARE is used to delete a share by the share creator. Users who have attached the share will lose access.
📄️ LIST SHARES
The LIST SHARES statement is used to list all shares that you've created.
📄️ PRINT_MD_TOKEN
You can retrieve your MotherDuck authentication token using the PRINTMDTOKEN PRAGMA.
📄️ UPDATE SHARE
Currently, sharing a database only creates a point-in-time snapshot of the database.
📄️ DROP DATABASE
The DROP statement removes a database entry added previously with the CREATE command.
📄️ SHOW ALL DATABASES
The SHOW ALL DATABASES statement shows all databases, would it be MotherDuck database, DuckDB database or MotherDuck shares.
📄️ MD_RUN parameter
For certain DuckDB Table Functions, MotherDuck now provides an additional parameter, MD_RUN that gives explicit control over where the query is executed.
📄️ CREATE SECRET
The documentation provided relies on DuckDB version 0.10.x. To update to this version, please visit our migration page.
📄️ DROP SECRET
The DuckDB DROP SECRET statement (see DuckDB DROP SECRET documentation) works in MotherDuck to delete the secret previously created with CREATE SECRET statement.
📄️ LIST SECRETS
Secrets can be listed in the same way as in DuckDB by using the table function duckdb_secrets().
📄️ Object name resolution
Fully qualified names (FQN) in MotherDuck are of the form ... Fully qualified naming convention allows you to query objects in MotherDuck regardless of context. Queryable objects can be tables and views.