Farst opretter (create) vi en tabel og for at sorge for at den ikke allerede i forvejen findes. skrivervi 'IF NOT EX-ISTS' saledes der ikke findes to ens tabeller i samme database. Kodeń viser hvilke forskellige kotonner tabellen indeholder (fx 'customerjd' og 'customer_firstnamel og dertil kan det ogsa ses hvilken datatype (INT. VARCHAR) de hver iseer har. Kolonnen customerjd' er primary key i denne tabel hvorimod zipcodejzip_code' er en foreign key.
Nar de forskellige tabeller er oprettet i databasen. kan der indsćettes data i disse. For at illustrere hvordan dette gares. kan vi tage tabellen 'customers' tilat starte med:
INSERT INTO customers (customerjd. customer.first-name. customer_lastname. customer_address. custom-er_phone. customer_email. zipcode_zip_code)
VALUES (NULL. 'Rie'. Larsen'. Abildgaardsvej 12 lth'. '53576754'.' r-larsen@hotmail.com1. '2830');
INSERT INTO customers (customerjd. customer.first-name. customerjastname. customer.address. custom-er_phone. customer.email. zipcode_zip_code)
VALUES (NULL. 'Helena1. 'Abel1. Gammel Kogę Landevej 23. T2345781. helena@abeLdk. '26501);
INSERT INTO customers (customerjd. customer.first-name, customerjastname. customer_address. custom-er.phone. customer.email. zipcode.zip.code)
VALUES (NULL. 'Simone1, 'Truelsen1, 'Magnoliavej 121, '54545454'. 'simone@fie.dk'. '2600');
INSERT INTO customers (customer.id, customer.first-name. customer.lastname, customer.address. custom-er.phone. customer.email. zipcode_zip_code)
VALUES (NULL. 'Mette'. 'Jorgensen'. 'Herlewej 92'. '49284828', 'mette@line.dk'. '2700');