Parameterized Queries

The SQL editor provides support for parameterized queries. For example,

select * from employee where id = &id

If the preference for parameterized queries is set to on (it is by default), then when executing the above query, RazorSQL will prompt the user for input for the &id variable. RazorSQL will then replace the value of &id with the value entered by the user. Multiple variables can be used in a query, and the same value can be entered multiple times by using the id. For example,

select * from employee e, department d where = &id and = &id and = &name

The user will be prompted for values for &id, which will be substituted for each occurrence of the &id variable, and for &name in this example.