I started with sqlite3 and now have to make the switch to mysql. My create table code structure for sqlite3 is
CREATE TABLE IF NOT EXISTS players(
"Name" TEXT,
"B/T" TEXT,
"Ht" TEXT,
"Wt" TEXT,
"DOB" TEXT,
UNIQUE (Name, DOB) ON CONFLICT IGNORE);
I am using a python script I have that appends from a data_frame to the db.table. The UNIQUE, ON CONFLICT IGNORE works the way i need it to for never appending duplicates. My issue is I cannot seem to get it to work in mysql. I have been searching for any ideas on how I can get the same result from that one line in mysql. My current mysql line that errors:
CREATE TABLE IF NOT EXISTS players(
Name VARCHAR(30),
`B/T` VARCHAR(5),
Ht VARCHAR(5),
Wt VARCHAR(5),
DOB VARCHAR(11),
UNIQUE (Name, DOB) ON CONFLICT IGNORE);
Any solution or criticism much appreciated!