Adjust for 2nf
This commit is contained in:
15
sql/2nf/allstargames.sql
Normal file
15
sql/2nf/allstargames.sql
Normal 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;
|
||||
Reference in New Issue
Block a user