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

Load data from a list into the Table

Using the multiple insert pattern, in this exercise, you will load the data from values_list into the table.

Bu egzersiz

Introduction to Databases in Python

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

Egzersiz talimatları

  • Import insert from sqlalchemy.
  • Build an insert statement for the census table.
  • Execute the statement stmt along with values_list. You will need to pass them both as arguments to connection.execute().
  • Print the rowcount attribute of results.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import insert


# Build insert statement: stmt


# Use values_list to insert data: results


# Print rowcount
print(____)
Kodu Düzenle ve Çalıştır