zoukankan      html  css  js  c++  java
  • 外键 Foreign keys

    https://docs.microsoft.com/en-us/sql/relational-databases/tables/create-foreign-key-relationships?view=sql-server-2017

    Create a foreign key relationship in Table Designer

    Create a foreign key relationship in Table Designer

    Using SQL Server Management Studio

    1. In Object Explorer, right-click the table that will be on the foreign-key side of the relationship and click Design.

      The table opens in Table Designer.

    2. From the Table Designer menu, click Relationships.   这里需要先右键选中column,然后才会有menu

    3. In the Foreign-key Relationships dialog box, click Add.

      The relationship appears in the Selected Relationship list with a system-provided name in the format FK_<tablename>_<tablename>, where tablename is the name of the foreign key table.

    4. Click the relationship in the Selected Relationship list.

    5. Click Tables and Columns Specification in the grid to the right and click the ellipses (...) to the right of the property.

    6. In the Tables and Columns dialog box, in the Primary Key drop-down list, choose the table that will be on the primary-key side of the relationship.

    7. In the grid beneath, choose the columns contributing to the table's primary key. In the adjacent grid cell to the left of each column, choose the corresponding foreign-key column of the foreign-key table.

      Table Designer suggests a name for the relationship. To change this name, edit the contents of the Relationship Name text box.

    8. Choose OK to create the relationship.

     

  • 相关阅读:
    2015多校.Zero Escape (dp减枝 && 滚动数组)
    UVa-11809
    UVa-1588 Kickdown
    UVa-1587
    UVa-10340
    UVa-202
    UVa-1368
    UVa-232 Crossword Answers
    UVa-227
    UVa-455 Periodic Strings
  • 原文地址:https://www.cnblogs.com/chucklu/p/10529928.html
Copyright © 2011-2022 走看看