eolas/Databases/SQL/8_CREATE.md
2022-08-05 20:30:04 +01:00

513 B

tags
Programming_Languages
Databases
sql

SQL: CREATE

Create a table (CREATE)

CREATE TABLE employee (
    employee_id text PRIMARY KEY,
    first_name text,
    surname text,
    address_number integer,
    address_1 text,
    address_2 text,
    locality text,
    region text,
    postal_code text,
    phone_number text,
    days_per_week real
    );

We specify the new table name first, then it's fields and their corresponding data types. We also set a primary key