Primary & Foreign Keys in pgAdmin

后端 未结 5 1678
悲&欢浪女
悲&欢浪女 2021-01-30 20:12

I was wondering can some give me an explanation on how to assign primary and foreign keys in pgAdmin?

I can\'t find any information online.

For example...I\'ve g

5条回答
  •  北海茫月
    2021-01-30 20:41

    Yes, there is a way to add Primary & Foreign Keys in pgAdmin.

    Tested in pgAdmin III Ver.1.16.1 (Windows 7)

    1. Select the table you want
    2. Ctrl+Alt+Enter or right-click / Properties
    3. Select "Constraints" tab
    4. At the left-bottom side of the form you will see the option "Primary Key"
    5. Click add
    6. Select "Columns" tab
    7. Select the column you want as a key
    8. Click add

    And you are all set.

    You can fill more things if you want, but now you know how to get there.

提交回复
热议问题