Skip to content

Instantly share code, notes, and snippets.

@lmariemeehan
Created January 15, 2019 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmariemeehan/c0cdf1f60a3efb102287233be58ce979 to your computer and use it in GitHub Desktop.
Save lmariemeehan/c0cdf1f60a3efb102287233be58ce979 to your computer and use it in GitHub Desktop.
Installing and Using Relational Databases
Lauras-MBP:~ laurameehan$ createdb -U laurameehan -w library
Lauras-MBP:~ laurameehan$ psql -f /Users/laurameehan/BLOC/computer-science-fundamentals/databases-and-sql/library-data.sql library laurameehan
CREATE TABLE
INSERT 0 4
Lauras-MBP:~ laurameehan$ psql library laurameehan
psql (11.1)
Type "help" for help.
library=# SELECT * FROM books;
id | title | author
------+------------------------------------------+---------------------
1259 | Eloquent Ruby | Russell A. Olson
1593 | JavaScript: The Good Parts | Douglas Crockford
8982 | Designing Object-Oriented Software | Rebecca Wirfs-Brock
7265 | Practical Object-Oriented Design in Ruby | Sandi Metz
(4 rows)
library=#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment