In Object Explorer, go to your table and select Keys > New Foreign Key from the context menu:

In the dialog that appears, click the Add button to create a new foreign key:

Give it a meaningful name, and then click the ... button to open the Tables and Columns specification dialog box:

Fill in the necessary columns for the parent and child tables, click OK and you're done!
Or much simpler and more efficient - use a T-SQL script!
ALTER TABLE dbo.OtherTable ADD CONSTRAINT FK_OtherTable_ParentTable FOREIGN KEY(OrderId, CompanyId) REFERENCES dbo.ParentTable(OrderId, CompanyId)
source share