Introduction to MD_INFORMATION_SCHEMA
The MotherDuck MD_INFORMATION_SCHEMA
views are read-only, system-defined views that provide metadata information
about your MotherDuck objects.
The following table lists all MD_INFORMATION_SCHEMA
views that you can query to retrieve metadata information:
Resource Type | MD_INFORMATION_SCHEMA View |
---|---|
Database | DATABASES |
Database Shares | OWNED_SHARES SHARED_WITH_ME |
Example usage
-- list all databases you created
from md_information_schema.databases;
-- list all shares you created
from md_information_schema.owned_shares;
-- select specific columns
select name, url, access, visibility from md_information_schema.owned_shares;
-- set md_information_schema as the current database
use md_information_schema;
-- list all the views in md_information_schema
show tables;