# Prepared Statements

PREPARE-SQL

>PREPARE-SQL

Create a prepared statement.

Function

### Syntax

          prepare-sql sql-stmt types &key database result-types field-names => result

### Arguments and Values

### Description

Prepares a SQL statement `sql-stmt` for execution. `types` contains a list of types corresponding to the input parameters. Returns a prepared-statement object. A type can be :int :double :null (:string n)

### Examples

### Side Effects

### Affected by

### Exceptional Situations

### See Also

### Notes

RUN-PREPARED-SQL

RUN-PREPARED-SQL

Execute a prepared statement.

Function

### Syntax

          run-prepared-sql prepared-stmt =>

### Arguments and Values

### Description

Execute the prepared sql statment. All input parameters must be bound.

### Examples

### Side Effects

### Affected by

### Exceptional Situations

### See Also

### Notes

FREE-PREPARED-SQL

FREE-PREPARED-SQL

Delete a prepared statement object.

Function

### Syntax

          free-prepared-sql prepared-stmt =>

### Arguments and Values

### Description

Delete the objects associated with a prepared statement.

### Examples

### Side Effects

### Affected by

### Exceptional Situations

### See Also

### Notes

BIND-PARAMETER

BIND-PARAMETER

Bind a parameter in a prepared statement.

Function

### Syntax

          bind-parameter prepared-stmt position value =>

### Arguments and Values

### Description

Sets the value of a parameter in a prepared statement.

### Examples

### Side Effects

### Affected by

### Exceptional Situations

### See Also

### Notes