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.
我在mysql中遇到问题。我想从包含 100 多条记录的表中删除 20 行。
我不知道行的 id,要删除的行的任何特殊标识。我只想从我的表中删除任何随机行。
请帮助我......我是这种情况的新手。
你可以做:
DELETE FROM tbl ORDER BY RAND() LIMIT 20
查看MySQLDELETE语法
DELETE