How do you create a foreign key relationship in a SQL Server CE (Compact Edition) Database?

前端 未结 7 716
闹比i
闹比i 2021-02-04 23:44

Visual Studio 2005 doesn\'t provide an interface for creating relationships between tables in a SQL Server CE database (I\'m using version 3.0) and you can\'t open a Compact Edi

相关标签:
7条回答
  • 2021-02-05 00:39

    Walkthrough: Creating a SQL Server Compact 3.5 Database

    To create a relationship between the tables created in the previous procedure

    1. In Server Explorer/Database Explorer, expand Tables.
    2. Right-click the Orders table and then click Table Properties.
    3. Click Add Relations.
    4. Type FK_Orders_Customers in the Relation Name box.
    5. Select CustomerID in the Foreign Key Table Column list.
    6. Click Add Columns.
    7. Click Add Relation.
    8. Click OK to complete the process and create the relationship in the database.
    9. Click OK again to close the Table Properties dialog box.
    0 讨论(0)
提交回复
热议问题