Adjust for 2nf

This commit is contained in:
2024-01-26 13:32:45 -06:00
parent 0d00bddead
commit 7b04bfb776
2 changed files with 16 additions and 1 deletions

15
sql/2nf/allstargames.sql Normal file
View File

@@ -0,0 +1,15 @@
begin;
create table if not exists allstargames (
"gameID" text,
"yearID" numeric,
"gameNum" numeric,
primary key("gameID")
);
insert into allstargames
select distinct gameid, yearid, gamenum
from allstarfull;
alter table allstarfull drop column "yearID";
alter table allstarfull drop column "gameNum";
commit;