Skip to content

Instantly share code, notes, and snippets.

@marcopeg
Last active October 26, 2022 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcopeg/f530da60fb2fd8408945a888ece0a82f to your computer and use it in GitHub Desktop.
Save marcopeg/f530da60fb2fd8408945a888ece0a82f to your computer and use it in GitHub Desktop.
Card deck db schema for PostgreSQL
INSERT INTO "ranks" VALUES
('A'), ('K'), ('Q'), ('J'), ('1'), ('2'), ('3'), ('4'), ('5'), ('6'), ('7'), ('8'), ('9'), ('10');
INSERT INTO "suits" VALUES
('♥️'), ('♠️'), ('♣️'), ('♦️');
INSERT INTO "brands" VALUES
('b1'), ('b2');
CREATE TABLE "ranks" (
"name" TEXT PRIMARY KEY
);
CREATE TABLE "suits" (
"name" TEXT PRIMARY KEY
);
CREATE TABLE "brands" (
"name" TEXT PRIMARY KEY
);
SELECT * FROM "ranks"
CROSS JOIN "suits"
CROSS JOIN "brands";
@marcopeg
Copy link
Author

marcopeg commented Oct 26, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment