lahmanlite/sql/keys/teamshalf.sql

20 lines
395 B
MySQL
Raw Normal View History

2024-01-26 00:48:11 +00:00
BEGIN;
CREATE TABLE IF NOT EXISTS "pk_teamshalf" (
"yearID" NUMERIC,
"lgID" TEXT,
"teamID" TEXT,
"Half" NUMERIC,
"divID" TEXT,
"DivWin" TEXT,
"Rank" NUMERIC,
"G" NUMERIC,
"W" NUMERIC,
"L" NUMERIC,
PRIMARY KEY("Half","yearID","teamID")
2024-01-26 00:48:11 +00:00
);
INSERT INTO "pk_teamshalf" SELECT DISTINCT * FROM "teamshalf";
DROP TABLE "teamshalf";
ALTER TABLE "pk_teamshalf" RENAME TO "teamshalf";
COMMIT;