SQL Server 2008: Find out primary/foreign key in Table?

后端 未结 5 865
再見小時候
再見小時候 2021-01-01 02:17

Does anyone know how I can see which are the primary & foreign keys in a table?

EDIT: Thanks for all the responses. I was looking for a SQL Query to do that. Rig

5条回答
  •  执笔经年
    2021-01-01 02:36

    In Management Studio, expand the table and then expand the Columns item. The primary key(s) has a key icon next to them.

    To see the foreign keys, expand the Constraints item.

提交回复
热议问题