LoginSignup
0
0

More than 3 years have passed since last update.

【MySQL/PostgreSQL】UNIQUE制約(一意制約)の違い

Posted at

MySQL

大文字と小文字を区別しない

hoge@gmail.com == Hoge@gmail.com -> true

UNIQUE制約に引っかからない。

PostgreSQL

大文字と小文字を区別する

hoge@gmail.com == Hoge@gmail.com -> false

UNIQUE制約に引っかかる。

ポスグレのほうが制約としては正しい気がしていますが、こういう仕様らしいです。

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