I'm familiar with the syntax of
create unique index 'blah' on 'some_table' ('col1','col2')
however I'm unsure exactly how this will behave. More specifically, the documentation says
That seems like it might be okay in some cases, but I want make a table that holds just numbers unique. So, I could see col1 being 12 and col2 being 2, which will concatenate to 122 from what I can tell, and then a value of col1 1 and col2 22 would match that, which is not what I want. Is there a way to define a separator for the concatenation or is there already one in place? Should I be doing this differently?
Here's an attempt at a diagram
table 1 middle table 2
------- ------ -------
t1_id mid_id t2_id
some_value t1_id another_value
t2_id
I want the t1_id and t2_id combination to be unique, but t1 can repeat and t2 can repeat.