见官方文档即可
Help - Eclipse Platform
http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.datatools.common.doc.user%2Fdoc%2Fhtml%2Fasc1229700393698.htmlCreating 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.
。
本文档介绍如何在Eclipse中创建并运行SQL查询。首先需要创建一个Java项目,然后新建一个SQL文件,并将其与Apache Derby数据库连接配置关联。接着输入SQL语句,通过右键菜单执行查询,最后在SQL结果视图中查看执行结果。
23万+

被折叠的 条评论
为什么被折叠?



