home / docs / sections

sections: sql_queries:sql-views

This data as json

id page ref title content breadcrumbs references
sql_queries:sql-views sql_queries sql-views Views If you want to bundle some pre-written SQL queries with your Datasette-hosted database you can do so in two ways. The first is to include SQL views in your database - Datasette will then list those views on your database index page. The quickest way to create views is with the SQLite command-line interface: $ sqlite3 sf-trees.db SQLite version 3.19.3 2017-06-27 16:48:08 Enter ".help" for usage hints. sqlite> CREATE VIEW demo_view AS select qSpecies from Street_Tree_List; <CTRL+D> ["Running SQL queries"] []
Powered by Datasette · Queries took 0.552ms