mysql重复数据数据库
表full中userid和movieid两个字段确定一条唯一的数据。
现在表中有少量重复数据和大量非重复数据。
重复数据中,preference列和timestamp列不为空的这些,需要保留;preference列和timestamp列为空的这些需要删除,应该怎么办?
初学者,希望答案详细:) 感激不尽
+------------+---------+------+-----+---------+-------+
| field | type | null | key | default | extra |
+------------+---------+------+-----+---------+-------+
| userid | int(11) | no | | 0 | |
| movieid | int(11) | no | | 0 | |
| preference | int(11) | yes | | null | |
| timestamp | int(11) | yes | | null | |
+------------+---------+------+-----+---------+-------+
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号