I'm creating a table in SQLite and need to stop certain duplicates before they are entered. For example:
This would be OK
[Product] = "Product A" & [Product Sub] = "Sub A"
[Product] = "Product B" & [Product Sub] = "Sub A"
However this would not be OK (and should not be saved):
[Product] = "Product A" & [Product Sub] = "Sub A"
[Product] = "Product A" & [Product Sub] = "Sub A"
Here is the code that I am using so far, but I don't know how to write the SQL correctly to achieve what I'm after:
CREATE TABLE IF NOT EXISTS [tblActivity_Sub] ([ActivityID_Sub] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, [Product] NVARCHAR(50) NOT NULL [Product Sub] NVARCHAR(50) NOT NULL UNIQUE)
Any help with this would be greatly appreciated (I am kind of new to this).
Thank you.