An SQL query expression.
A list of strings.
A list of strings.
A list.
An output stream.
A database.
The print-query
function takes a symbolic SQL query expression and formatting information and prints onto stream a table containing the results of the query.
A list of strings to use as column headings is given by titles , which has a default value of nil
.
The formats argument is a list of format strings used to print each attribute, and has a default value of t
, which means that ~A
or ~VA
are used if sizes are provided or computed.
The field sizes are given by sizes . It has a default value of t
, which specifies that minimum sizes are computed.
The output stream is given by stream , which has a default value of t
. This specifies that *standard-output*
is used.
The following call prints out two even columns of names and salaries:
(print-query [select [surname] [income] :from [person]]
:titles '("NAME" "SALARY"))