Last active
March 31, 2017 16:28
-
-
Save BenjaminVerble/4f9cd35b158cab1eaba76a0cb4f25b94 to your computer and use it in GitHub Desktop.
Revisions
-
BenjaminVerble revised this gist
Mar 31, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,8 @@ VALUES ('2134dfg45675fa4352', 'Joe Sixpack') ; UPDATE authors SET author = 'Fran Sixpack' where id = '2134dfg45675fa4352'; SELECT authors.id, books.title, authors.author FROM -
BenjaminVerble created this gist
Mar 31, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ CREATE TABLE books (author_id varchar(55) PRIMARY KEY, title varchar(55)) ; INSERT INTO books ('author_id', 'title') VALUES ('1asdfasdfasdfasdas', 'How to make your life better'), ('asdfasdf23423456gf', 'How to Cook'), ('2134dfg45675fa4352', 'Hi, what is your name, I am joe') ; CREATE TABLE authors (id varchar(55), author varchar(55)); INSERT INTO authors ('id', 'author') VALUES ('1asdfasdfasdfasdas', 'John Smith'), ('asdfasdf23423456gf', 'Jane Smith'), ('2134dfg45675fa4352', 'Joe Sixpack') ; SELECT authors.id, books.title, authors.author FROM books JOIN authors ON books.author_id == authors.id;