From d5ca0774246bd8819054c2a1af27fb5482d093c5 Mon Sep 17 00:00:00 2001 From: Peter Wood Date: Sat, 4 Mar 2023 18:25:37 -0500 Subject: [PATCH] account table creation --- postgres/tables/accounts.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 postgres/tables/accounts.sql diff --git a/postgres/tables/accounts.sql b/postgres/tables/accounts.sql new file mode 100644 index 0000000..c30668e --- /dev/null +++ b/postgres/tables/accounts.sql @@ -0,0 +1,19 @@ +drop table if exists public.accounts; + +CREATE TABLE public.accounts( + acct_id serial, + bank_name varchar(50) not null, + account_type varchar(50) not null, + account_number varchar(20) null, + friendly_name varchar(50) null, + insert_dt_tm timestamp default now(), + PRIMARY KEY( acct_id ) +); + +INSERT INTO public.accounts (bank_name, account_type, friendly_name) values +('Bank of America', 'Checking', 'Joint Checking') +, ('Ally', 'Savings', 'Joint Savings') +, ('Ally', 'Savings', 'Vacation Savings') + +select * from public.accounts a +