mirror of
https://github.com/acedanger/budget-database.git
synced 2025-12-05 22:50:13 -08:00
account table creation
This commit is contained in:
19
postgres/tables/accounts.sql
Normal file
19
postgres/tables/accounts.sql
Normal file
@@ -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
|
||||||
|
|
||||||
Reference in New Issue
Block a user