October 11th, 2014, 06:32 AM
Table column contraint
I have a META table that contains an ALIAS field which allows for translation of a given fieldname in a CSV to map to a column name in another table (MAPPING).
eg. SECTION NAME ALIAS
A AAA AAAAAA
A BBB BBBBBB
A CCC AAAAAA
if a field with name AAA is read it maps to column AAAAAA in the MAPPING table
if a field with name BBB is read it maps to column BBBBBB in the MAPPING table
if a field with name CCC is read it maps to column AAAAAA in the MAPPING table
What I want to know is :
Is it possible to put a constraint on the META table that the ALIAS column value MUST be a column already present in the MAPPING table.
October 12th, 2014, 05:16 AM
you can only reference it to a UNIQUE or PRIMARY key
December 2nd, 2014, 02:13 AM
I am 100% agree with r937.