System Macro Functions (FireDAC)

From RAD Studio
Jump to: navigation, search

Go Up to Preprocessing Command Text (FireDAC)

The following table lists the system macro functions:

Function Description Local expression engine
DATABASE( ) Returns the name of the database corresponding to the connection. +
IFNULL(exp, value) If exp is null, value is returned. If exp is not null, exp is returned. The possible data type or types of value must be compatible with the data type of exp. +
IF(exp, value1, value2)

IIF(exp, value1, value2)

If exp is True, value1 is returned; otherwise, value2 is returned. Do not mix IF/IIF escape functions with IF/IIF conditional substitutions. To call IF/IIF escape function use {fn IF(...)} or {fn IIF(...)} syntax. +
LIMIT([skip,] rows) Allows limiting the result set, by skiping first <skip> records and returning to more than <rows> records. The function can be put in any place of the SQL command. -
NEWGUID( ) Returns the new randomly-generated GUID value. It is not supported as the escape function. +
USER( ) Returns the user name in the DBMS. This can be different than the login name. +