Skip to content

Instantly share code, notes, and snippets.

@jinagamvasubabu
Last active July 2, 2023 13:16
Show Gist options
  • Save jinagamvasubabu/c79718e7919e7054b373b11ef7477fac to your computer and use it in GitHub Desktop.
Save jinagamvasubabu/c79718e7919e7054b373b11ef7477fac to your computer and use it in GitHub Desktop.

login to postgres and connect to database accounts

docker exec -it postgres psql -U user -d accounts

create table balances

CREATE TABLE IF NOT EXISTS public.balances ( id SERIAL PRIMARY KEY, name character varying, balance integer NOT NULL, updated_at timestamp DEFAULT now() );

inserting some data

insert into balances(name, balance) values ('Ramu', 100), ('Srinu', 100), ('Hari', 100);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment