例:1S999 OK 1s999 NG
①
QLで変更する場合
テーブル作成時
CREATE TABLE `posts` (
`id` INT(11) PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(100) BINARY,
...
);
②変更のケース
ALTER TABLE `posts` MODIFY `name` VARCHAR(100) BINARY;
③検索時に、フィールドにBINARY演算子を加える
これは一時的な設定です。
SELECT * FROM `posts` WHERE `user_id` = BINARY 'Hoge'; hogeなら、通らない。Hogeの大文字idのみ通る。
Why not register and get more from Qiita?
- We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
- you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
Sign upLogin