见官方文档即可
Help - Eclipse Platform
http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.datatools.common.doc.user%2Fdoc%2Fhtml%2Fasc1229700393698.html
Creating and Executing a SQL Query
Create a SQL file and run it against a given database instance.
1. Create a Java project. a. Select File > New > Project from the main menu bar.
b. Select Java Project and click Next.
c. Enter a Project Name and click Finish.
2. Create a SQL file and associate it with a Derby connection profile. a. Select File > New > SQL File from the main menu bar.
b. In the Enter or Select Parent Folder box, select the Java project you just created.
c. Enter the File Name.
d. Associate this SQL file with the Apache Derby connection profile by indicating the Database Server Type, Connection Profile Name, and Database Name.
3. Click Finish.
4. In SQL File Editor, enter the following SQL statement:
select * from SYS.SYSTABLES
5. Right-click in the editor and select Execute All.
The query results appear in the SQL Results view. The left pane displays the execution history. For each statement, including stored procedures, that you run, you can create an Eclipse launch configuration. This allows you to quickly retest the execution using slightly different values and settings. You can rename or delete launch configurations as needed.
Parent topic: Data Tools Platform Tutorial Overview
Previous topic: Running a Stored Procedure
当然,自己也可以先创建好,然后在
- Associate this SQL file with the Apache Derby connection profile by indicating the Database Server Type, Connection Profile Name, and Database Name.
。