A database is a set of tables, information about those tables, information about users and their permissions, and much more. What most people think of as a database (say, a list of customers) is actually a table. You’ll get help on just that item: Command: DROP TABLEĭROP TABLE name For example, to get help on DROP TABLE:. You can get help on a particular item by listing it after the \h command. Press space to continue, or q to stop the output.You type backslash, the letter q, and then you press the Enter or return key. Quitting pqsqlīefore we learn anything else, here’s how to quit psql and return to the operating system prompt. You’ll use psql (aka the PostgreSQL interactive terminal) most of all because it’s used to create databases and tables, show information about tables, and even to enter information (records) into the database. # Password when asked is csizllepewdypieiib $ psql -U doadmin -h production-sfo-test1-do-user-4866002-0.db. -p 25060 -d mydb I think DO generated this for me, or maybe PostgreSQL. # -d is the name of the database to connect to. # -p is the port where the database listens to connections. # -U is the username (it will appear in the \l command) # -h is the name of the machine where the server is running. This worked to connect to Postgres on DigitalOcean On Windows it might look like C:\Program Files\PostgreSQL> but Windows prompts are also configurable. Prompts are configurable so it may well not look like this. The $ starting a command line in the examples below represents your operating system prompt.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |