KYUA-DB-EXEC(1)

NAME
kyua db-exec - Executes a SQL statement in a results file

SYNOPSIS
kyua db-exec [--no-headers] [--results-file file] statement

DESCRIPTION
The kyua db-exec command provides a way to execute an arbitrary SQL statement within the database. This command is mostly intended to aid in debugging, but can also be used to extract information from the database when the current interfaces do not provide the desired functionality.

The input database must exist. It makes no sense to use kyua db-exec on a nonexistent or empty database.

The kyua db-exec command takes one or more arguments, all of which are concatenated to form a single SQL statement. Once the statement is executed, kyua db-exec prints the resulting table on the screen, if any.

The following subcommand options are recognized:

--no-headers
    Avoids printing the headers of the table in the output of the command.

--results-file path, -s path
    __include__ results-file-flag-read.mdoc

  Results files
__include__ results-files.mdoc

EXIT STATUS
The kyua db-exec command returns 0 on success or 1 if the SQL statement is invalid or fails to run.

Additional exit codes may be returned as described in kyua(1).

SEE ALSO
kyua(1), kyua-test(1)