The visual SQL Query Editor in MyEclipse can be used to easily create complex SQL statements without having to remember their syntax. Not only that, it also uses easy-to-use wizards to visually add tables, create connections, manage groups, expressions, and Output commands, among others. In this tutorial, you will learn to:
- Open the Visual SQL Query Editor
- Add a table to a query and create a connection
- Building an expression
- Run the SQL
Duration: 10 minutes
No myeclipse? Download Now
1. Open the Visual SQL Query Editor
There are several ways to access the visual SQL Query Editor.
1.1 opening from the SQL editor
Right-click the SQL Editor and select Open in MyEclipse Visual SQL Query Editor. When you finish using the visual SQL Query Editor, the query that you create is inserted into the SQL editor, and if it does, it supersedes the select query.
Open the Visual SQL Query Editor1.2 Open an existing SQL file
Right-click the SQL file, and then click Open with>myeclipse Visual SQL Query Editor.
Open the SQL file in the visual SQL Query Editor1.3 Open a database connection
Right-click the database Browser connection and select New Visual SQL Query Editor.
To open the Query Editor from a connection2. Add a table to the query and create a connection
(1) Right-click the editor and select Add Table.
Add a table to a query
(2) Select a table, then use it in your query and click OK.
Select a table to add to the query
(3) Drag from one column to another to create a connection between the two.
Create a connection3. Build an expression for your output
(1) Select Build Expression from the drop-down list of column.
Constructs an expression and displays the result in the output
(2) Select the type of expression you want to build.
Select an expression type
This example uses the SUM function to return the sum of the amount columns in the Payment table.
Sum Function Example
(3) Use the Groups tag to group the results of the CustomerName column.
Grouping results by CustomerName4. Run the query
Describes the queries that have been completed. To do this, right-click the source view and select Run SQL.
Complete the query
The results are displayed in the SQL results view.
Run the results of the query
MyEclipse official Chinese online line, welcome to download Communication!
Building SQL query statements in MyEclipse