1. Learn
  2. /
  3. Projects
  4. /
  5. Applying SQL to Real-World Problems

Connected

Exercise

A VIEW of all your columns

In this exercise you will create a new tool for finding the tables and columns you need. Using the system table information_schema.columns you will concatenate the list of each table's columns into a single entry.

Once you've done this you will make this query easily reusable by creating a new VIEW for it called table_columns.

Instructions 1/2

undefined XP
    1
    2

Concatenate the column_name(s) for each table_name into a comma-separated list using the STRING_AGG() function and save this as a new field called columns.