Building SQL Queries  
 
 

Studio provides a powerful visual query builder to build, test, and save database queries with the Structured Query Language (SQL).

 
 
  Choose one of these commands to open the Query Builder:  
 
  • Right-click on a database or on a table in the Database (DB) Resource tab and choose New Query.
  • Click Tools > SQL Builder and select a database from the Select Database Query dialog.
  • Open the CFQUERY tag editor and click New Query.

The Query Builder is designed to let you build different kinds of queries and then insert them into an application page. The Query Builder supports developing four types of SQL queries:

  • Select
  • Insert
  • Update
  • Delete

The Query Builder has three panes:

  • 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 that is being built by the query builder. 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.

The Query Builder toolbar gives you quick access to many of its functions.

Query 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 to use for the query.

To create an insert, update, or delete query, choose the type from the Query Builder toolbar or right-click in the Table pane and choose the Query Type.



 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.