EXECUTE-COMMAND — Execute an SQL command which returns no values.Generic Function
sql-expression
An sql expression that represents an SQL statement which will return no values.
database
A database object. This will default to the value of *default-database*.
Executes the SQL command
sql-expression
, which may be a symbolic
SQL expression or a string representing any SQL statement apart
from a query, on the supplied database
which defaults to *default-database*.
(execute-command "create table eventlog (time char(30),event char(70))") => (execute-command "create table eventlog (time char(30),event char(70))") >> >> While accessing database #<CLSQL-POSTGRESQL:POSTGRESQL-DATABASE {480B2B6D}> >> with expression "create table eventlog (time char(30),event char(70))": >> Error NIL: ERROR: amcreate: eventlog relation already exists >> has occurred. >> >> Restarts: >> 0: [ABORT] Return to Top-Level. >> >> Debug (type H for help) >> >> (CLSQL-POSTGRESQL::|(PCL::FAST-METHOD DATABASE-EXECUTE-COMMAND (T POSTGRESQL-DATABASE))| >> #<unused-arg> >> #<unused-arg> >> #<unavailable-arg> >> #<unavailable-arg>) >> Source: (ERROR 'SQL-DATABASE-ERROR :DATABASE DATABASE :EXPRESSION ...) >> 0] 0 (execute-command "drop table eventlog") =>
Whatever effects the execution of the SQL statement has on the underlying database, if any.