Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: First Table | Introduction to SQLite
Databases in Python

Swipe to show menu

book
Challenge: First Table

Task

Swipe to start coding

Your task is to complete the code that creates an SQLite database and a table called articles. Here’s what you need to do:

  1. Connect to the database my_database.db.
  2. Create a cursor to execute SQL commands.
  3. Use the cursor to create a table named articles with the following fields:
    • id β€” type INTEGER.
    • title β€” type TEXT.
    • content β€” type TEXT.
    • author β€” type TEXT.
  4. Save the changes and close the database connection.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 5
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

Awesome!

Completion rate improved to 4.76

book
Challenge: First Table

Task

Swipe to start coding

Your task is to complete the code that creates an SQLite database and a table called articles. Here’s what you need to do:

  1. Connect to the database my_database.db.
  2. Create a cursor to execute SQL commands.
  3. Use the cursor to create a table named articles with the following fields:
    • id β€” type INTEGER.
    • title β€” type TEXT.
    • content β€” type TEXT.
    • author β€” type TEXT.
  4. Save the changes and close the database connection.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

close

Awesome!

Completion rate improved to 4.76

Swipe to show menu

some-alt