GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — sql-postgres-course/person-car-2.sql at main · amigoscode/sql-postgres-course Expand file tree/ Copy pathperson-car-2.sqlMore file actions 33 lines (28 loc) · 1.19 KB / Copy pathperson-car-2.sqlFile metadata and controls33 lines (28 loc) · 1.19 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 create table person ( person_uid UUID NOT NULL PRIMARY KEY, first_name VARCHAR(50) NOT NULL, last_name VARCHAR(50) NOT NULL, gender VARCHAR(7) NOT NULL, email VARCHAR(100), date_of_birth DATE NOT NULL, country_of_birth VARCHAR(50) NOT NULL, car_uid UUID REFERENCES car(car_uid), UNIQUE(car_id), UNIQUE(email) ); create table car ( car_uid UUID NOT NULL PRIMARY KEY, make VARCHAR(100) NOT NULL, model VARCHAR(100) NOT NULL, price NUMERIC(19, 2) NOT NULL CHECK (price > 0) ); -- INSERT INTO PERSON insert into person (first_name, last_name, gender, email, date_of_birth, country_of_birth) insert into person (first_name, last_name, gender, email, date_of_birth, country_of_birth) values ('Omar', 'Colmore', 'Male', null, '1921-04-03', 'Finland'); insert into person (first_name, last_name, gender, email, date_of_birth, country_of_birth) -- INSERT INTO CAR insert into car (make, model, price) values ('Land Rover', 'Sterling', '87665.38'); insert into car (make, model, price) values ('GMC', 'Acadia', '17662.69'); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |