Skip to main content

SQL Parameters

SQL requests can pass parameter placeholders:

SELECT id, name FROM robots WHERE id = @id;
UPDATE robots SET name = @name WHERE id = @id;

Parameter values are bound by the client, shell command, or HTTP request that submits the SQL.

HTTP Example

{
"databaseName": "app",
"sql": "SELECT id, name FROM robots WHERE year >= @year",
"parameters": {
"@year": {
"type": 2,
"strValue": null,
"longValue": 1970,
"floatValue": 0,
"boolValue": false
}
}
}

See HTTP API and .NET Driver for client-specific binding details.