LoginSignup
0
0

More than 5 years have passed since last update.

外部キー制約の指定コマンド

Posted at

項目ごとに指定する方法

CREATE TABLE テーブル名 (
    列名  REFERENCES 参照元テーブル名 (参照先列名)
    :
)

CREATE文の最後にまとめて定義する方法

CREATE TABLE テーブル名 (
    :
    FOREIGN KEY (参照元列名) REFERENCES 参照先テーブル名 (参照先列名)
)
0
0
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
0
0