Creating SQL scrapbook pages

You can use the SQL editor to create SQL statements in SQL scrapbook pages.

Before you begin

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:

  1. Open the New SQL Scrapbook Page wizard.
    By using the File menu
    1. Click File > New > Other.
    2. In the New wizard, expand the Data node, click SQL Scrapbook Page, and then click Next.
    By using a project
    1. In a perspective other than the Data perspective, right-click the project folder, and then click New > Other.
    2. In the New wizard, expand the Data node, click SQL Scrapbook Page, and then click Next.
    By using the Data Source Explorer toolbar
    1. In the Data Source Explorer view of the Data perspective, click the Open SQL Scrapbook toolbar button.
    2. In the Connection Selection window, select the database connection, and then click OK.
    By using a database
    1. In the Data Source Explorer view of the Data perspective, expand the database connection.
    2. Right-click the database, and then click Open SQL Scrapbook.
  2. 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.
  3. Specify one or more SQL statements in the SQL editor.
  4. If you want to use content assist and a No connection message is displayed in the status bar, connect to a database.
  5. Optional: Run the SQL statements in the SQL scrapbook page. If you run an INSERT, UPDATE, or DELETE statement, you can modify the database.
  6. Save the SQL scrapbook page.

Feedback