lahmanlite/sql/keys/people.sql

34 lines
705 B
MySQL
Raw Normal View History

2024-01-25 05:44:50 +00:00
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;