Class Activity 2 - Creating New Tables (Week 2)
Example SQL Code
There are a few things to note:
Transit to
EBIS3003
database.DROP TABLE
in case you made mistake before.VARCHAR
v.VARCHAR2
v.CHAR
.The numbers are 'bytes,' not # of characters.
Difference between standard SQL v. MySQL (or other variations).
CONSTRAINT
can be omitted in MySQL.Use of
NULL
.INT
andDECIMAL
are different!The order of creating tables matter when you have constraints.
The name of foreign key can be different from its original name in the referenced table.
A Simple Data Model
powered by https://dbdiagram.io/
Last updated
Was this helpful?