SQL(and ? ,?)
- 语句一
update carts set total_amount = ? , total_count = ? where id = ?
- 语句二
update carts set total_amount = ? and total_count = ? where id = ?
语句一为正确的语句,
那么语句二会报错吗?
答案是,并没有报错,但是,执行无法达到预期total_amount
会变为 0 。
2024-03-06 17:09:32
update carts set total_amount = ? , total_count = ? where id = ?
update carts set total_amount = ? and total_count = ? where id = ?
语句一为正确的语句,
那么语句二会报错吗?
答案是,并没有报错,但是,执行无法达到预期total_amount
会变为 0 。