[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'SQLDB' (#fcl)

# TSQLQuery.SQL

The SQL statement to execute

## Declaration

Source position: sqldb.pp line 697

`published property TSQLQuery.SQL : TStringList;`

## Description

SQL is the SQL statement that will be executed when ExecSQL is called, or Open is called. It should contain a valid SQL statement for the connection to which the TSQLQuery component is connected. SQLDB will not attempt to modify the SQL statement so it is accepted by the SQL engine.

Setting or modifying the SQL statement will call UnPrepare

If ParseSQL is True, the SQL statement will be parsed and the Params property will be updated with the names of the parameters found in the SQL statement.

See also Using parameters

## See also

TSQLQuery.ParseSQL |  | Should the SQL statement be parsed or not
TSQLQuery.Params |  | Parameters detected in the SQL statement.
TCustomSQLQuery.ExecSQL |  | Execute a SQL statement that does not return a result set
TDataset.Open |  | Activate the dataset: Fetch data into memory.