Foreign keys only by specific attribute
Tom1555
Posts: 1 New member
Hello I want generate in the table foreign keys but in original table this rows have column activate (true/false) and I want foreign key from this table only with activate=true
Is it any way how do this ?
The data from original table are generated too.
Is it any way how do this ?
The data from original table are generated too.
Tagged:
Answers
Thanks for you post!
Just to make sure I'm understanding correctly what you're hoping to do - can you please provide more detail, perhaps the schema of your table as well as an example of what the data should look like?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
For example, I use this query: SELECT ID FROM DBO.FK_TABLE WHERE ACTIVATE = TRUE
The problem I ran into was having to manually hack the config file when I wanted to populate different DB on a different server... but hopefully this does what you need...
Good Luck!