lahmanlite/sql/2nf/allstargames.sql

16 lines
316 B
PL/PgSQL

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;