Skip to content

Instantly share code, notes, and snippets.

@tomalex0
Created June 3, 2015 08:19
Show Gist options
  • Select an option

  • Save tomalex0/9dee4fff85583732e7d0 to your computer and use it in GitHub Desktop.

Select an option

Save tomalex0/9dee4fff85583732e7d0 to your computer and use it in GitHub Desktop.
CREATE TABLE user
(`id` int, `name` varchar(55), `email` varchar(55))
;
CREATE TABLE friends
(`id` int,`user_id` int, `name` varchar(55), `email` varchar(55))
;
CREATE TABLE trip
(`id` int,`user_id` int, `location` varchar(55), `date` varchar(55))
;
INSERT INTO user
(`id`, `name`, `email`)
VALUES
(1, 'Name1', '[email protected]'),
(2, 'Name2', '[email protected]'),
(3, 'Name3', '[email protected]')
;
INSERT INTO friends
(`id`, `user_id`, `name`, `email`)
VALUES
(1, 1,'FriendName1', '[email protected]'),
(2, 1,'FriendName2', '[email protected]'),
(3, 2,'FriendName3', '[email protected]'),
(4, 3,'FriendName4', '[email protected]')
;
INSERT INTO trip
(`id`, `user_id`, `location`, `date`)
VALUES
(1, 1,'LA', '20150603'),
(2, 2,'SFO', '20150723'),
(3, 3,'LV', '20151013')
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment