Skip to content
Home » D1Admin Documentation » D1 SQL Editor

D1 SQL Editor

Executing SQL queries is fundamental part of the DBA activities. In this section we are going to explore the SQL input interface of D1Admin and how to execute queries against our Cloudflare D1 database.

In order to be able to use the tools described here, we should have already installed the D1Admin backend.

D1 SQL editor (SQL tab)
Query By Example (Search tab)

D1 SQL Editor

From the SQL tab of D1Admin we can run D1 SQL statements. This is how the SQL editor looks like:

executing SQL queries against Cloudflare D1

The SQL editor offers code completion for D1 SQL keywords, table and view names and table field names.

For SELECT statements the resulting rows will be printed in a table below the SQL input box.
For other SQL statements, only the operation outcome will be displayed like rows affected, or if there was an error, the error message text.

The Search tab of D1Admin contains an interface for easy retrieval of data from a single D1 database table. Here we can specify the criteria for which the data must be filtered and returned, by using a set of common operators.

The Search functionality is rather limited compared to what we can do with SQL queries, so for more complex data retrieval we should use the SQL editor instead.


This page introduced the SQL and Search tabs of D1Admin. The Search tab functionality is similar to a once popular tool of IBM® called Query by Example.

The SQL tab is full featured SQL editor with code completion, where we can execute all possible variations of D1 SQL commands.