0
0
Supabasecloud~10 mins

Creating tables via dashboard in Supabase - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new table named 'customers' in Supabase dashboard.

Supabase
CREATE TABLE [1] (id SERIAL PRIMARY KEY, name TEXT);
Drag options to blanks, or click blank then click option'
Acustomers
Borders
Cproducts
Dsales
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different table name than 'customers'.
Confusing table names with column names.
2fill in blank
medium

Complete the code to add a column for storing email addresses as text.

Supabase
ALTER TABLE customers ADD COLUMN [1] TEXT;
Drag options to blanks, or click blank then click option'
Aaddress
Bphone
Cemail
Dage
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated column names like 'phone' or 'age'.
Forgetting to specify the data type.
3fill in blank
hard

Fix the error in the code to create a table with a primary key.

Supabase
CREATE TABLE orders (order_id [1] PRIMARY KEY, order_date DATE);
Drag options to blanks, or click blank then click option'
ATEXT
BINTEGER
CVARCHAR
DSERIAL
Attempts:
3 left
💡 Hint
Common Mistakes
Using TEXT or VARCHAR for primary keys without auto-increment.
Using INTEGER without auto-increment.
4fill in blank
hard

Fill both blanks to create a table 'products' with an integer primary key and a text column 'product_name'.

Supabase
CREATE TABLE products (product_id [1] PRIMARY KEY, [2] TEXT);
Drag options to blanks, or click blank then click option'
ASERIAL
Bproduct_name
Cname
DINTEGER
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'INTEGER' without auto-increment for primary key.
Using wrong column name for product name.
5fill in blank
hard

Fill all three blanks to create a table 'employees' with an auto-increment primary key, a text column 'first_name', and a date column 'hire_date'.

Supabase
CREATE TABLE employees (employee_id [1] PRIMARY KEY, [2] TEXT, [3] DATE);
Drag options to blanks, or click blank then click option'
ASERIAL
Bfirst_name
Chire_date
DINTEGER
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'INTEGER' instead of 'SERIAL' for primary key.
Mixing up column names or data types.