SQL2012 设置外键FK约束

    xiaoxiao2021-03-25  95

    1.右键单击要选中的列(Age)->关系->Tables And Columns Specification

    2.左边Primary key table 表示主表,选择关联主表的列名

    3.右边Foreign key table 选择作为外键的列名

    4.点击OK,ctrl+s 保存设置.

    add:在录入数据时应先录入主表的数据.

    转载请注明原文地址: https://ju.6miu.com/read-17641.html

    最新回复(0)