MySQL老用到SQL和iOS上的默认表情

删除重复记录,只保留其中一条:
DELETE a  FROM  message_send AS a , ( select batchId,min(msgid)  AS msgid FROM message_send GROUP BY batchId HAVING COUNT(batchId)>1  )  AS  b  WHERE a.batchId=b.batchId AND a.msgid > b.msgid  

iOS平台上的表情符是UTF8mb4,而MySQL5.5.3以下版本的UTF8只存储了3个字节,故插入表情符会报异常。升级后即可。http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html

你可能感兴趣的:(MySQL老用到SQL和iOS上的默认表情)