Learn more about Toad for SQL Server
at Quest.com

Find solutions and downloads at the
Toad for SQL Server Support Portal

< To bookmark a page, right-click the Page Title and select Add to Favorites / Bookmark This Page

Toad for SQL Server 5.7

You are here: Edit SQL > Set Bind Variables

Set Bind Variables

You can execute queries that contain parameter binds and can specify the bind variables. In addition, Toad also allows you to store a value for a bind variable.

Toad supports the following bind variable formats:

Notes:

To set a bind variable

  1. In the Editor, compose and execute a query that contains parameter binds. Toad immediately displays the Bind Variables dialog.

  2. Enter the bind variable information. Review the following for additional information:

    Type

    Select the data type for the variable from the list.

    Direction

    Select the direction of variable from the list.

    Value

    Enter the value of the variable.

    Notes:  

    • If you selected a direction of OUT or RETURN, this value is ignored.

    • Values for bind variables are not saved between different sessions of Toad.

To use a bind variable in the Query Builder

» In the Where, Having, or OR Condition editor, enter the bind variable in place of a constant.

To store a value for a bind variable

Toad allows you to store a value for a bind variable. Then, when you execute a SQL statement containing that bind variable, Toad will not prompt you for a value. You can access this feature from the Project Manager toolbar.

  1. Click in the Project Manager toolbar.
  2. Enter a name and a value for the bind variable, and specify a data type.

 

 

Related Topics