Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有下表
球员
player_id score 1 - 300 2 - 400
我可以做一个查询,将一个玩家的分数加 10 吗?
因为现在我能想到的就是查询数据库,获取分数,加10,然后查询数据库并将300替换为310?
PS:我是 SQL 新手
你可以试试这个:-
UPDATE players SET score = score + 10 WHERE player_id = 1
还要检查MySQL 中的 UPDATE