BaşlayınÜcretsiz Başlayın

Determining data types

The columns table of the INFORMATION_SCHEMA database also allows us to extract information about the data types of columns in a table. We can extract information like the character or string length of a CHAR or VARCHAR column or the precision of a DECIMAL or NUMERIC floating point type.

Using the techniques you learned in the lesson, let's explore the customer table of our DVD Rental database.

Bu egzersiz

Functions for Manipulating Data in PostgreSQL

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Select the column name and data type from the INFORMATION_SCHEMA.COLUMNS system database.
  • Limit results to only include the customer table.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Get the column name and data type
SELECT
 	___, 
    ___
-- From the system database information schema
FROM ___.COLUMNS 
-- For the customer table
WHERE table_name = ___;
Kodu Düzenle ve Çalıştır