SQLite Conditional Insertion
I'm struggling to understand how or if I can make a conditional insertion using SQLite. I want to insert rows of data, but I would prefer if, during insertion, a check can be done to decide if the row of data should be inserted. Each row has a timestamp value which is set to NOW() (i know that's not a SQLite function, its just for simplicity here) on insertion. Let's say a row contains the following fields: timestamp, Name, Size, Nickname I want it to check if there is already existing in the table a row that has the same Name, Size, Nickname values. If timestamp is the only thing that differs, we should NOT INSERT the row data. If any of Name, Size, Nickname differs, we should INSERT the data. If there a way to achieve this in SQLite? PS: I also would like if this can work with mass VALUES insertion. So my existing INSERT SQL is something like: INSERT INTO table (timestamp, name, size, nickname) VALUES (NOW(),"Fredrick","25","Fred"), (NOW(),"Margaret","21","Marg"), ... etc with lots of rows of data in a single insert