We'll call this table sales, and it will be a simple representation of store sales: the location name, product name, price, and the time it was sold. Setting up the data (creating sales)įor our examples we'll use a table that stores the sales records of various products across different store locations. You will learn and remember far more by working through these examples rather than just reading them. I encourage you to follow along with these examples and run these queries for yourself. Note: I've cleaned up the psql output in these examples to make it easier to read, so don't worry if the output shown here isn't exactly what you've seen in your terminal. You are now connected to database "fcc" as user "john". Next let's start the interactive console by using the command psql, and connect to the database we just made using \c : $ psql With PostgreSQL already installed, we can run the command createdb at our terminal to create a new database. ![]() If you have another database client that you enjoy working with that's fine too. ![]() To work with our PostgreSQL database, we can use psql-the interactive PostgreSQL command line program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |