Sunday, September 30, 2012

Run query against MySQL database using NetBeans IDE

Follow the steps below...
1. Open .


2. Choose the tab.


3. Right click the  then choose New Connection....




4. The New Connection Wizard will appear, choose the MySQL (Connection/J drive)  then hit the  button.



5. Fill up the field(s) for the MySQL connection, then click  button (leave the Database field as blank).



6. Hit  button.



7. On the  tab choose the  then double click the  to show the list of all databases in the MySQL server.

8. Select any database and any table table on the listed items.



9. Right click the table (e.g. studentdb.tblstudents) then choose Execute Command...



10. The SQL Command window will appear, type any query then hit  or press Ctrl + Shift + E to run. 

Sample result


No comments:

Post a Comment