INSERT command inserts new rows into a table.
for this tutorial we already have db created with with name "test_db".
"test_db" is having table with name testtable.
testtable contains two columns "id" and "name". if you don't have dbs created than follow the link
How to create
database and
tables in PostgreSQL.to create dbs and tables.
Switch to postgres shell with below two commands
[gcptutorial@localhost ~]$ sudo su - postgres-bash-4.2$ psql
Switch to database "test_db"
postgres=# \c test_db
Execute insert command
test_db=# INSERT INTO testtable (id, name) VALUES (6, 'user6');