You can use the SQL editor to create SQL statements in
SQL scrapbook pages.
Before you begin
- Create the project in which to store the SQL scrapbook page.
- To create an SQL scrapbook page by using the Data Source Explorer
toolbar or a database, create the database connection.
About this task
An SQL scrapbook page can contain one or more SQL statements.
Each statement ends with a statement terminator. You can change the
statement terminator in any SQL scrapbook page. The statement terminator
applies to all of the SQL statements in a given scrapbook page.
You
can create an SQL scrapbook page by using one of the following approaches:
- The File menu
- A project
- The Data Source Explorer toolbar
- A database
Procedure
To create an SQL scrapbook page:
- Open the New SQL Scrapbook Page wizard.
|
|
| By using the File menu |
- Click .
- In the New wizard, expand the Data node,
click SQL Scrapbook Page, and then click Next.
|
| By using a project |
- In a perspective other than the Data perspective, right-click
the project folder, and then click .
- In the New wizard, expand the Data node,
click SQL Scrapbook Page, and then click Next.
|
| By using the Data Source Explorer toolbar |
- In the Data Source Explorer view of the Data perspective, click
the Open SQL Scrapbook toolbar button.
- In the Connection Selection window, select the database connection,
and then click OK.
|
| By using a database |
- In the Data Source Explorer view of the Data perspective, expand
the database connection.
- Right-click the database, and then click Open SQL Scrapbook.
|
- Complete the New SQL Scrapbook Page wizard,
and then click Finish. The
SQL scrapbook page is added to the project that you selected in the
wizard and opens in the SQL editor.
- Specify one or more SQL statements in the SQL editor.
- If you want to use content assist and a No connection message
is displayed in the status bar, connect to a database.
- Optional: Run the SQL statements in the SQL
scrapbook page. If you run an INSERT, UPDATE, or DELETE
statement, you can modify the database.
- Save the SQL scrapbook page.