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

What tables are in your database?

You don't have to rely solely on knowing what tables exist. Instead, you can query the pg_catalog.pg_tables to list all of the tables that exist in your database.

Of course, this will list every table, including system tables so ideally, you want to limit your results to the schema where your data resides which in this case is 'public'.

Note: This system table is specific to PostgreSQL but similar tables exist for other databases (see slides).

Bu egzersiz

Applying SQL to Real-World Problems

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

Egzersiz talimatları

  • List the tables that exist in your database by querying the table: pg_catalog.pg_tables.
  • Filter the query to ensure the result contains entries where the schemaname is 'public'.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

SELECT * 
FROM ___
___;
Kodu Düzenle ve Çalıştır