7

Hi everyone am fairly new to mysql, I made a java program that stores data in mysql database. I am using this tool called mysql-workbench that can create databases, tables and much more. What I wanted to do is to view all the contents of the table I just populated with data in my java program. I know that one can view all the contents of a table using some SQL scripts, however am wondering if mysql-workbench can display all the contents in the table without entering SELECT mysql script in a sort of tabular form or similar to how they display contents of table in phpMyAdmin.

The reason why I wanted to do this is that I have 2-3k entries in that table and using a console is kind of messy. Any help or suggestions on how to do this? Thanks in advance.

3 Answers 3

10

After you create a connection to your database, execute the following two commands: USE <DATABASE NAME>; SELECT * FROM <TABLE NAME>;

Then MySQL Workbench will show another pane with the results. This will be the entire contents of the table.

4
  • hi thanks for answering, so in short I have to enter a sql query before it shows me the whole contents.
    – dimas
    Commented Sep 17, 2012 at 23:21
  • Yes sir. It's a little confusing the way that pane isn't shown when you first open your connection.
    – psyklopz
    Commented Sep 17, 2012 at 23:22
  • just a question SELECT * the asterisk bit what does it mean? I am not good with SQL scripts yet. Does it mean the whole column or entry of that table?
    – dimas
    Commented Sep 17, 2012 at 23:27
  • You read the * as ALL, it means to select all columns.
    – psyklopz
    Commented Sep 17, 2012 at 23:27
1

You certainly can.

This article: Using MySQL Workbench to Execute SQL Queries and Create SQL Scripts gives you step by step instructions (with screenshots). Enjoy!

2
  • Thanks for answering xelco, I did try this tutorial and I downloaded their pdf however most of it would instruct me to enter a sql script so that all the contents in the table will be displayed. However I was looking for a "just click and click" solution if you know what I mean. Kinda lazy but at the moment its not my priority to learn sql scripts.
    – dimas
    Commented Sep 17, 2012 at 23:25
  • I feel your pain. Ultimately, if you're working with mysql I would invest the time to memorize "SELECT * FROM <table>". It's worth it. Good luck!
    – xelco52
    Commented Sep 17, 2012 at 23:36
0

OP said: "However I was looking for a "just click and click" solution if you know what I mean. "

You can also right click the table you are interested in via the schema inspector tab on the left, and select the option: "Select Rows - Limit 1,000" for a quick view, obviously limited to 1,000 results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.