0
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 5 years have passed since last update.

「oracle」と「sqlserver」NULLと空文字の判別の違い

Posted at

初めに

oracleからsqlswrverへ移行した際にはまった空文字とNULLの違いについて

結論

oracleは空文字とNULLを
NULLとするが。

sqlserverは空文字は空文字、NULLはNULlとして判別する。

そうです。

oralceとaccess
sqlserverとaccess

作業用のデータベースにaccessデータベースを挟んでいますが
そのaccessDBにはoracleに合わせて空文字やNULLの許可の設定を行なっていましたが
sqlserverに移行したことでNULLと空文字の区別が行われaccessDBの設定との不一致が起こり
エラーの温床になりました。

僕が見ているデータベースの違いはほんとに表面上しか見れていませんが
DBの移行を行うと全てに影響が起こるのですね。

とりあえず今回はプログラムを書く上でDBにおけるNULLと空文字の違いでやられたので
2度と忘れないように記録します。

以上。

0
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
0
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?