home / docs / sections

Menu

sections: pages:pages-custom-sql-queries

This data as json

id page ref title content breadcrumbs references
pages:pages-custom-sql-queries pages pages-custom-sql-queries Custom SQL queries The /database-name/-/query page can be used to execute an arbitrary SQL query against that database, if the execute-sql permission is enabled. This query is passed as the ?sql= query string parameter. This means you can link directly to a query by constructing the following URL: /database-name/-/query?sql=SELECT+*+FROM+table_name Each configured stored query has its own page, at /database-name/query-name . Viewing this page will execute the query and display the results. In both cases adding a .json extension to the URL will return the results as JSON. ["Pages and API endpoints", "Queries"] []
Powered by Datasette · Queries took 5.964ms