I inserted data to mysql table 'table1' using java.But in the table in the workbench doesn't updated.When I retrive that table using java,inserted data using java will be shown.How to refresh my 'table1' table in workbench when I insert new data using java?
Workbench doesn't automatically refresh table data on INSERT
or UPDATE
etc, so assuming you're viewing the table in question you should have a 'Navigator' pane open to the left.
If you expand the database you're working on, and find the relevant table there should be a few icons to the right of the table name. Click on the table symbol with the lightning bolt to execute a SELECT *
on the table.
Referring to the image below it is the 'Select' button.
Assuming that you viewed the table by clicking on the view-table
button as pointed below 👇
This will write a query for you in the editor and view the table contents.
Now suppose you updated the table via any means (any orm, mysql command line, etc.). To show the latest contents of the table just press
Ctrl + Enter
(might differ for other OS(s))
This will re-run the query in the editor and hence, you will get the latest contents.
⚠ Caution: If the cursor is on any other query in the editor, it will run that query.
DELIMITER
in the sql window, I have seen that cause it to execute unexpected things. –
Lissome These answers, while correct, are not optimal because they will create a new tab. Instead, just hit the Refresh button just above the table output (next to the Result Grid label), which will re-execute the original query.
© 2022 - 2024 — McMap. All rights reserved.