Database.executeSql

New in package 166

Syntax

Database.executeSql( query [, parameter1[, parameter2[, etc]] )
Database.executeSql( query [, parameters] )

Parameters

Parameter Description
query A string representing the SQL query to be executed.
parameters Optional array of query parameters.

Description

Executes specified SQL query.

Returns an array of objects. Properties of these objects are named after the retrieved columns. Note that all columns to be retrieved must have names.

Example

Executing a stored procedure

Retrieving records count

See also

Database, Database.transaction

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.