0
0
PostgreSQLquery~30 mins

What is PostgreSQL - Hands-On Activity

Choose your learning style9 modes available
Introduction to PostgreSQL
📖 Scenario: You are starting a new project that requires storing and managing data efficiently. You decide to use PostgreSQL, a popular database system.
🎯 Goal: Learn what PostgreSQL is and create a simple database table to understand its basic structure.
📋 What You'll Learn
Understand what PostgreSQL is
Create a database table in PostgreSQL
Insert data into the table
Query data from the table
💡 Why This Matters
🌍 Real World
PostgreSQL is widely used in businesses and applications to store user data, transactions, and more.
💼 Career
Knowing PostgreSQL is valuable for roles like database administrator, backend developer, and data analyst.
Progress0 / 4 steps
1
Create a table called employees
Write a SQL statement to create a table named employees with columns id (integer), name (text), and age (integer).
PostgreSQL
Need a hint?

Use CREATE TABLE followed by the table name and define columns with their data types inside parentheses.

2
Insert data into the employees table
Write a SQL statement to insert a row into employees with id 1, name 'Alice', and age 30.
PostgreSQL
Need a hint?

Use INSERT INTO followed by the table name and columns, then VALUES with the data in parentheses.

3
Query data from the employees table
Write a SQL statement to select all columns from the employees table.
PostgreSQL
Need a hint?

Use SELECT * to get all columns from the table.

4
Add a primary key constraint to id
Modify the employees table creation statement to add a primary key constraint on the id column.
PostgreSQL
Need a hint?

Add PRIMARY KEY after the id INTEGER column definition.