sql

'' と NULL

mysql> create table b (a varchar(10)); Query OK, 0 rows affected (0.05 sec) mysql> insert into b values(''); Query OK, 1 row affected (0.08 sec) mysql> select * from b where a = '' ; +------+ | a | +------+ | | +------+ 1 row in set (0.00 …

SQLをspyする p6spy を使ってみる

インストール http://www.p6spy.com/ から p6spy-install.jar をダウンロードして解凍する mysql >rem mysqlがデフォなのでmysqlでためす >dir /B p6spy.jar spy.properties mysql.jar TestMySQL.java >rem 簡単な検証サンプル >type TestMySQL.java import …