1 year ago

#347701

test-img

Majd Mustafa

INSERT OR IGNORE with SQLModel using Python

Does anyone know if its possible to get a INSERT OR IGNORE function with SQLModel? And if not, does anyone know if there is a workaround to get the same results?

I haven't tried anything to get the results I'm look for as I'm fairly new to programming. I just been reading of documentation.

If you have used SQLite before you know that INSERT OR IGNORE is a function that looks for the primary_key in your database and if it doesn't exist, it will insert the new data into the database, but if the primary_key does exist, it will completely ignore the data and prevent errors on your code.

python

python-3.x

sqlite

sqlmodel

0 Answers

Your Answer

Accepted video resources