0% found this document useful (0 votes)
18 views1 page

Create Test Database SQL

The document creates a test database and within it three tables: addresses, people, and pets to store address, person, and pet data including relationships between them.

Uploaded by

Varun Taurus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Create Test Database SQL

The document creates a test database and within it three tables: addresses, people, and pets to store address, person, and pet data including relationships between them.

Uploaded by

Varun Taurus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 1

CREATE DATABASE test;

USE test;

CREATE TABLE addresses (

id INT,
house_number INT,
city VARCHAR(20),
postcode VARCHAR(7)
);

CREATE TABLE people (

id INT,
first_name VARCHAR(20),
last_name VARCHAR(20),
address_id INT
);

CREATE TABLE pets (

id INT,
name VARCHAR(20),
species VARCHAR(20),
owner_id INT
);

SHOW TABLES;

You might also like