docs/user_guide/editing-data.md
Double click a table in the left sidebar to open an Excel-like interface for viewing and editing the data. We call this the Table View
This view allows you to:
The table view provides a spreadsheet-like experience for selecting, copying, and pasting data. Beekeeper supports many spreadsheet-like interaction primitives.
hide columnAt the top of the table are data filters. You can use these to search your table for the specific data you want.
There are two types of filter you can use - the filter GUI, and the raw SQL filter
The filter GUI lets you check any column on the table for a variety of conditions:
!!! warning
When using LIKE in your filters, don't forget to use %. For example to find all titles that contain foo you would write: %foo%, not foo
Click the little <> icon to the left of the filters to enter a sql filter. You can type anything in here that would appear in the WHERE clause of a sql statement.
In the table view you can easily edit any cell you like. Simply double click the cell to edit.
!!! note Beekeeper only supports editing tables with primary keys.
Editing a JSON document in a tiny table cell isn't a great experience. Instead you can right click the cell and select Edit in Modal. This will provide a pop-out modal with syntax highlighting and checking.
Beekeeper Studio doesn't typically allow you to edit a table that does not contain a primary key, but other database GUIs allow this, so what gives?
In general, if you don't have a primary key on your table there is no reliable way to identify a specific row. Some GUIs support editing in this situation, but they use a heuristic to determine which row to update. A common technique is matching all the values of the row to perform the update, or using a secret row identifier.
Some databases provide an internal identifier for rows, but they're not always stable.
The PostgreSQL ctid identifies the physical location of a row, but can change during a vaccum, making it unsuitable as a real row identifier in certain situations.
Oracle's ROWID is similar, but the docs explicitly state that You should not use ROWID as the primary key of a table..
We never want Beekeeper Studio to be the reason you update the wrong row in a production database. Ever. A solution that works 99% of the time, or even 99.9% of the time isn't good enough when dealing with production data.
For that reason editing of table data is disabled unless your table has a primary key.
rowid is used by Beekeeper Studio in SQLite to enable data editing where you haven't specified a primary key.Beekeeper has a unique design that 'stages' changes before applying them, so you can make multiple changes to be applied inside of a single transaction.
Staged change types are indicated by color:
To commit a change, click the Apply in the bottom right of the screen. To discard the change, click Reset. You can also click Copy To Sql if you'd like to make manual changes to the operations.
!!! warning Sorting or filtering the table during editing will discard your staged changes.
You can clone, delete, and create new rows of data pretty easily.
Right click a row (or multiple rows) to delete or clone.
Click the + button at the bottom right to add a new row. New rows will be added to the end of the table, even though they appear at the top of the UI for convenience.
The table view allows you to copy
If you press the copy keyboard shortcut (ctrl+c or cmd+c), you will copy the data in a spreadsheet-friendly format (it will paste beautifully into Google Sheets or Excel)
Alternatively, right-click any cell to copy that row (or all selected cells) in a range of formats like CSV, JSON, and Markdown.
You can quickly generate a SQL IN clause from selected data in the table view. Select one or more cells in a column, then right-click and choose Create IN Statement. Beekeeper Studio will generate an IN (...) clause containing all the selected values, ready to paste into your SQL editor.
Click the ⚙ icon in the bottom right and select export to export a whole table, or the filtered table view.
From here you can get a full snapshot of the table, ready to share with others.