Navigation:  NexusDB Guide > SQL Reference > SQL Statements >

Prepared Statements

Previous pageReturn to chapter overviewNext page

NexusDB V3 Manual

Prepared Statements

button_main button_prev button_next

NexusDB Manual V3 > SQL Reference > SQL Statements

 

NexusDB preserves the execution context of an SQL statement if a prepared statement is requested by the client application, and stays prepared until explicitly unprepared. A prepared statement can therefore be reused without the overhead of creating a new execution context every time the statement is executed.

 

 

Usage

 

Prepared statements are typically used in combination with parameters, which is an efficient method for reusing data manipulation statements that are frequently used. For example, instead of executing a batch of UPDATE statements with explicit values, it is more efficient to prepare a parameterized UPDATE statement and provide the parameter values before each execution.

 

 

Examples

 

SELECT statement with parameters in the search condition

INSERT statement with parameters in the VALUES clause

UPDATE statement with parameters in the SET clause

DELETE statement with parameters in the WHERE clause

 

© Nexus Database Systems Pty Ltd.

nexus_logo