GCLOUD_SPANNER_DATABASES_EXECUTE-SQL(1)

NAME

gcloud spanner databases execute-sql - executes a read-only SQL query against a Cloud Spanner database

SYNOPSIS

gcloud spanner databases execute-sql DATABASE --instance=INSTANCE --sql=SQL [--query-mode=QUERY_MODE; default="NORMAL"] [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
Executes a read-only SQL query against a Cloud Spanner database.

POSITIONAL ARGUMENTS

    DATABASE
        Cloud Spanner database ID.

REQUIRED FLAGS

    --instance=INSTANCE
        Cloud Spanner instance ID.

    --sql=SQL
        The SQL query to issue to the database. Cloud Spanner SQL is described at https://cloud.google.com/spanner/docs/query-syntax

OPTIONAL FLAGS

    --query-mode=QUERY_MODE; default="NORMAL"
        Mode in which the query must be processed. QUERY_MODE must be one of:

        NORMAL
            Returns only the query result, without any information about the query plan.

        PLAN
            Returns only the query plan, without any result rows or execution statistics information.

        PROFILE
            Returns both the query plan and the execution statistics along with the result rows.

GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.