Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Your first table
CREATE TABLE basics
Entity Relationship Diagrams (ERD)
11. ERD to SQL code
DROP - how to remove a table

Instruction

OK, let's proceed. A table in an ERD diagram is represented by a rectangle with its name. There are also all of the columns listed together with their data types. Not very complicated, huh? Take a look:

The exhibit table

Do you recognize the table? That's right, it's the table exhibit for the museum of childhood.

There can be more kinds of information shown in the diagrams - you will learn about them in another part of the course.

Exercise

Based on the ERD diagram below, write the proper SQL statement which will create the table in the database.

The product table

Stuck? Here's a hint!

Type

CREATE TABLE product (
   id int,
   name varchar(32),
   brand varchar(32),
   price int
);