I have a database that is updated with datasets from time to time. Here it may happen that a dataset is delivered that already exists in database.
Currently I'm first doing a
SELECT FROM ... WHERE val1=... AND val2=...
to check, if a dataset with these data already exists (using the data in WHERE-statement). If this does not return any value, I'm doing my INSERT.
But this seems to be a bit complicated for me. So my question: is there some kind of conditional INSERT that adds a new dataset only in case it does not exist?
I'm using SmallSQL
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…