Upadate语句
UPDATE sys_user SET password = 'ca86dcd5bd98e0b5a4b97c5cc0add3b42ee799b5b4886b5f122a08f3'
UPDATE sys_user SET name1 = name2
UPDATE hrm_staff_office_information a
SET a.appoint_expenditure_proportion =
(SELECT u.appoint_expenditure_proportion FROM sys_user u WHERE a.staff_no = u.no)
生成随机数
SELECT ROUND(ROUND(RAND(),12)*1000000000000);//生成12位随机数
UPDATE sys_user SET id = CONCAT('180101',(SELECT ROUND(ROUND(RAND(),6)*1000000))) WHERE LENGTH(id) < 12
查找重复数据
SELECT name , no, count(*) FROM sys_user GROUP BY name, no HAVING count(*)>1