LoslegenKostenlos loslegen

Identifying data types

Being able to identify data types before setting up your query can help you plan for any potential issues. There is a group of tables, or a schema, called the information_schema, which provides a wide array of information about the database itself, including the structure of tables and columns.

The columns table houses useful details about the columns, including the data type.

Note that the information_schema is not the default schema SQL looks at when querying, which means you will need to explicitly tell SQL to pull from this schema. To pull a table from a non-default schema, use the syntax schema_name.table_name.

Diese Übung ist Teil des Kurses

Reporting in SQL

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

-- Pull column_name & data_type from the columns table
SELECT 
	____,
    ____
FROM ____
-- Filter for the table 'country_stats'
WHERE table_name = ____;
Code bearbeiten und ausführen