All Manuals > LispWorks User Guide and Reference Manual > 19 Common SQL > 19.5 Symbolic SQL syntax > 19.5.1 The "[...]" Syntax

NextPrevUpTopContentsIndex

19.5.1.4 Enclosing literal SQL

Literal SQL statements can simply be enclosed in the square bracket syntax, as shown below.

Creating a full query (which can be used as argument to query):

["SELECT FOO, BAR FROM BAZ"]
-> #<SQL "SELECT FOO, BAR FROM BAZ">

Using an unportable function condition in :where :

(sql:select [*] :from ["aTable"]
            :where ["unportable_function() > 89"])

LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex