Simple CRUD in Postgres

Open Your Terminal
write “psql -U postgres”, -U = User , postgres is user
Create Database book store
enter to database book store with “\c book_store”, in the second red box is name database that we enter
Create Table book, ‘create table book (column);’
insert data into book table
view saved data with select from book, * = all data
Update data ‘Update book Set price = 40 WHERE id =1’ , update data in table book and edit price in id 1
Delete data, but before that enter one more data
Note:
don’t copy paste because this trains your writing details from typos
don’t forget semicolon because it makes your command not work
don’t forget between dots and commas
follow me for more and more information about IT!, Thanks.
Subscribe to my newsletter
Read articles from MUHAMMAD directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
