Search code examples
google-cloud-platformgoogle-cloud-spanner

Cloud Spanner — Equivalent Syntax for `SHOW TABLES`?


It's not clear how to run a query (or conduct an API call) to list all tables. Is this possible with Spanner?


Solution

  • Ah, looks like this is documented here: https://cloud.google.com/spanner/docs/information-schema. In particular:

    SELECT
      t.table_name
    FROM
      information_schema.tables AS t
    WHERE
      t.table_catalog = '' and t.table_schema = ''