Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Sep 18 '12 at 2:06

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 7 down vote accepted

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.

share|improve this answer
    
hi thanks for answering, so in short I have to enter a sql query before it shows me the whole contents. –  dimas 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. –  psyklopz 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? –  dimas Sep 17 '12 at 23:27
    
You read the * as ALL, it means to select all columns. –  psyklopz Sep 17 '12 at 23:27
    
Thanks, for your help. I really appreciate it. –  dimas Sep 17 '12 at 23:30

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!

share|improve this answer
    
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 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 <table>". It's worth it. Good luck! –  xelco52 Sep 17 '12 at 23:36
    
Yup I think so, thanks for all your help ;) –  dimas Sep 17 '12 at 23:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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