34 lines
705 B
MySQL
34 lines
705 B
MySQL
|
BEGIN;
|
||
|
CREATE TABLE "pk_people" (
|
||
|
"playerID" NUMERIC,
|
||
|
"birthYear" NUMERIC,
|
||
|
"birthMonth" NUMERIC,
|
||
|
"birthDay" NUMERIC,
|
||
|
"birthCountry" NUMERIC,
|
||
|
"birthState" NUMERIC,
|
||
|
"birthCity" NUMERIC,
|
||
|
"deathYear" NUMERIC,
|
||
|
"deathMonth" NUMERIC,
|
||
|
"deathDay" NUMERIC,
|
||
|
"deathCountry" NUMERIC,
|
||
|
"deathState" NUMERIC,
|
||
|
"deathCity" NUMERIC,
|
||
|
"nameFirst" NUMERIC,
|
||
|
"nameLast" NUMERIC,
|
||
|
"nameGiven" NUMERIC,
|
||
|
"weight" NUMERIC,
|
||
|
"height" NUMERIC,
|
||
|
"bats" NUMERIC,
|
||
|
"throws" NUMERIC,
|
||
|
"debut" NUMERIC,
|
||
|
"finalGame" NUMERIC,
|
||
|
"retroID" NUMERIC,
|
||
|
"bbrefID" NUMERIC,
|
||
|
primary key("playerID")
|
||
|
);
|
||
|
|
||
|
INSERT INTO "pk_people" SELECT DISTINCT * FROM "people";
|
||
|
DROP TABLE "people";
|
||
|
ALTER TABLE "pk_people" RENAME TO "people";
|
||
|
COMMIT;
|