title: How to create a table to check if a value exist on other table, if the value is not a primary key there?
body: <p>I have a situation where I want to create a table so that when someone tries to insert a row in it, it will verify if a combination of some of these attributes exist in other table. </p>
  
  <p>For example, say that a,b,c,d,e constitute attributes from table F which I am trying to create. I want to verify that a,b,c,d exist in Table G. Table G has as attributes a,b,c,d ; however for other reasons 'b' can not be a primary key and only has a NOT NULL constraint. Due to this, I can't simple let a combination of 'a,b,c,d' from Table F be a FK for this table which would solve the problem, because b is not PK. </p>
  
  <p>Is there any check that could do the same as setting an FK on a,b,c,d that references table G inside table F, but wouldn't require b to be primary key?</p>
  
  <p>If I didn't make it clear enough, let me know and I will edit it. I already checked the manual but I can't seem to find the right clause.</p>
  
  <p>Thank you. </p>