DROP TABLE IF EXISTS scores;
SET NAMES utf8mb4;
CREATE TABLE scores (
name char(30) NOT NULL,
score int NOT NULL,
PRIMARY KEY (name, score),
note char(30)
) DEFAULT CHARSET=utf8mb4;
INSERT INTO scores (name, score) VALUES ("Taro Yamada", 29);
INSERT INTO scores (name, score) VALUES ("Taro Yamada", -12);
INSERT INTO scores (name, score) VALUES ("Taro Yamada", 27);
INSERT INTO scores (name, score) VALUES ("Taro Yamada", 10);
SELECT * FROM scores;
name	score	note
Taro Yamada	-12	
Taro Yamada	10	
Taro Yamada	27	
Taro Yamada	29	
UPDATE scores SET note = "Note"
  WHERE name = "Taro Yamada" AND score = 27;
SELECT * FROM scores
WHERE name = "Taro Yamada" AND (score >= -12 AND score < 29);
name	score	note
Taro Yamada	-12	
Taro Yamada	10	
Taro Yamada	27	Note
DROP TABLE scores;
