I am trying to create a table where I need it so as NOT to allow rows where the three fields are the same.
When I create a table in Python using SQLLite, I use the following, but I get almost nothing. Usually it stops after recording 2 records, so something, obviously, believes in its duplication.
CREATE TABLE CorpWalletJournal ( date INT, refID INT, refTypeID INT, ownerName1 TEXT, ownerID1 INT, ownerName2 TEXT, ownerID2 INT, argName1 TEXT, argID1 ID, amount INT, balance INT, reason TEXT, accountKey INT, UNIQUE (ownerID1, ownerID2, accountKey, argID1) );
So, I would like the database NOT to allow records where ownerID1, ownerID2, accountKey and argID1 are the same.
Can someone help me with this?
Thank you!
source share