Using ColdFusion Studio
|
|
Chapter 7 : Accessing ColdFusion Data Sources
|
Using SQL Builder
Studio provides a powerful visual tool to build, test, and save SQL statements for use in data queries. Select a query type from the SQL Builder toolbar or right-click in the Table pane and choose from the Query Type list.
 |
To open SQL Builder choose one of these methods:
|
- Right-click on a database or a table in the Database tab and choose New Query.
- Click Tools > SQL Builder, select a database from the dropdown list, and click New Query.
- Open the CFQUERY tag editor and click the New Query icon.
The SQL Builder interface
The following illustration shows the SQL Builder interface:
The SQL Builder is divided into four sections:
- Toolbar -- Contains icons for SQL keywords and commands.
- Table pane -- Provides a view of the tables in your query and allows you to create joins between tables.
- Properties pane -- Allows you to set the properties of the query such as the columns that are being selected or the columns that are being updated.
- SQL pane -- Shows you the SQL statement as it is built.
Writing SQL statements
SQL Builder opens a SELECT statement by default, since this is the most common type of query. If you have not chosen a table, you will be asked to select one.
SQL Builder supports four types of SQL statements:
- Select
- Insert
- Update
- Delete
The SQL pane does not support reverse editing, so any changes you make in this pane will not be made to the query in the Properties pane or the Table pane.
Copyright © 1999, Allaire Corporation. All rights reserved.
|
|