1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Accessでテーブルの複合キー設定方法

Last updated at Posted at 2022-10-18

概要

主キーが1カラムの場合、カラム選択 ⇒ 右クリックメニュー ⇒ 主キー で設定できる。
でも複合キーはその方法では設定できない。

やり方

テーブル上で右クリック ⇒ デザインビュー 。
image.png

複合キーにしたいカラムを選択。
image.png

テーブルデザイン ⇒ 主キー 。
鍵マーク付く。
image.png

蛇足

どんなテーブルでも レコードを一意に特定するキー は設定しておいた方がいいよ!

複合インデックスを設定したい場合

参考サイトさん

バージョン

Windows 10 Pro 21H2 OSビルド 19044.2130
Microsoft Access for Microsoft 365 MSO (バージョン 2209 ビルド 16.0.15629.20196) 32 ビット

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?