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.

dimas
  • 171
  • 1
  • 2
  • 5

3 Answers3

9

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.

psyklopz
  • 206
  • 1
  • 2
  • hi thanks for answering, so in short I have to enter a sql query before it shows me the whole contents. –  Sep 17 '12 at 23:21
  • Yes sir. It's a little confusing the way that pane isn't shown when you first open your connection. –  Sep 17 '12 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? –  Sep 17 '12 at 23:27
  • You read the * as ALL, it means to select all columns. –  Sep 17 '12 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!

xelco52
  • 111
  • 3
  • 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. –  Sep 17 '12 at 23:25
  • I feel your pain. Ultimately, if you're working with mysql I would invest the time to memorize "SELECT * FROM ". It's worth it. Good luck!
    –  Sep 17 '12 at 23:36
  • Yup I think so, thanks for all your help ;) –  Sep 17 '12 at 23:41
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.