Updating existing records is one of the most common database tasks. The Nobregas MySQL Panel lets you edit row data using SQL UPDATE statements on the SQL Query page — target the specific row, change its values, and execute.
Finding the Row to Edit
- Log in at mysql.nobregas.org.
- Go to Databases > click Manage on your database.
- Click the table name or Browse button.
- On the Data tab, locate the row you want to edit and note its primary key value (e.g.,
id).
Editing a Row with SQL
- Click SQL Query in the top navigation bar.
- Select the database from the dropdown.
- Write an UPDATE statement targeting the specific row:
UPDATE users SET name = 'Jane Doe', email = 'jane@example.com' WHERE id = 5;
- Click the Execute button.
A success message confirms the update and shows the number of affected rows.
Always include a WHERE clause to target the specific row. Without it, all rows in the table will be updated.
What You Can Update
- Any regular column (VARCHAR, TEXT, INT, DECIMAL, DATE, etc.)
- NULL values — replace them with actual data
- Default values — override them with new data
What to Be Careful With
- Auto-increment IDs — While technically editable, changing primary key values is not recommended as it can break relationships.
- System-generated timestamps — Columns set to
ON UPDATE CURRENT_TIMESTAMPwill auto-update when you modify the row.
Common Update Patterns
Update a single column
UPDATE products SET price = 24.99 WHERE id = 10;
Update multiple columns
UPDATE users SET name = 'John', email = 'john@example.com', active = 1 WHERE id = 3;
Set a column to NULL
UPDATE orders SET notes = NULL WHERE id = 7;
Update with a condition
UPDATE users SET active = 0 WHERE last_login < '2025-01-01';
Handling Errors
Common errors when updating:
- Data too long — The new value exceeds the column's maximum length.
- Duplicate entry — The new value conflicts with a UNIQUE constraint.
- Invalid format — Entering text in a numeric column or an invalid date.
- Foreign key constraint — The value references a non-existent record in a related table.
The panel displays the specific MySQL error so you know exactly what to fix.
Best Practices
- Always verify the row you are updating — check the ID or other unique identifiers in the WHERE clause.
- Update one row at a time for safety when making manual changes.
- Create a backup before making large-scale edits.
- Preview first — Run a SELECT with the same WHERE clause to see which rows will be affected:
SELECT * FROM users WHERE id = 5;