Macro
sql
do-query &rest args query &key database &rest body =>
A set of bindings.
A database query.
A database.
A Lisp code body.
do-query repeatedly executes body within a binding of args on the attributes of each record resulting from query. The return value ofdo-query is determined by the result of executing body. *default-database*. ename from the tableemp to the variablename, and then printsname using the Lisp functionprint.
(do-query ((name) [select [ename] :from [emp]])
(print name))