Run Query

SQL Editor default mode is read-only, which only supports running SELECT queries. If you attempt to run DDL or DML change queries, SQL Editor will prompt you to create a new issue to start the SQL change workflow.

Workspace Admins and DBAs are allowed to execute any SQL statements in Admin Mode.

The read-only mode is not available for MongoDB, but you also can execute the statements in Admin Mode.

Run query

Click the Run button or use the shortcut key (⌘ + Enter) to run your queries in the SQL Editor.

If you have multiple SQL queries separated by semicolons, SQL Editor will only run the first query for now.

SQL Editor can return at most 100,000 rows and 100 MB size in total.

Query Limit

Explain query

SQL Editor provides an Explain button to run EXPLAIN on the selected query. You can click it or use the shortcut key (⌘ + E) instead of prepending EXPLAIN manually.

Batch mode

This feature is available in Enterprise Plan.

You can batch query many databases having the same schema:

batch-query-setting

For each database, the query result will show up in its own tab:

batch-query-result1

batch-query-result2

Search result

You can retrieve anything you want from query results quickly.

Search Result

Export data

The exported data still respects the masking policy to mask exported columns if enforced.

If you have been granted export access, you can directly export query results in various formats.

Export Data

Otherwise, you can request the exported data

Request Export Request Export

Edit this page on GitHub

Subscribe to Newsletter

By subscribing, you agree with Bytebase's Terms of Service and Privacy Policy.