On Thu, Jul 12, 2012 at 10:13 PM, MB Software Solutions General
Account <[email protected]> wrote:
> I've seen how to create a rule for data in a column using direct values
> (http://www.databasejournal.com/features/mssql/article.php/3811831/Using-Check-Constraints-to-Validate-Data-in-SQL-Server.htm).
>
> But I want to basically say "Only allow values in this FK field that exist
> as PKs in that other table."
>
> How do I do that?
-----------------------------------

Create a Database diagram.  Drop the two tables, or more, you want in
this situation.

Drag the columns onto one another to create that line in the diagram.

Save the diagram and it will create the constraints.


-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJidMY+B7ZqMCrQrGOELZCBks7CFWUVtCJS0--15yXfszwxh=q...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to