mysql常见问题
mysql常见问题
select * from table where id IN (3,6,9,1,2,5,8,7) order by field(id,3,6,9,1,2,5,8,7);
MYSQL使用group by时,查询结果的总记录数
SELECT COUNT(*) FROM (SELECT COUNT(*) FROM tb_lm_channel_everytj GROUP BY `date` ) a ;
mysql 替换某个字段里相同之处的字符 简化版
UPDATE tb_charpter SET charpterName = REPLACE ( charpterName,'a' 'b' ) WHERE bid = 30105;
mysql 替换某个字段里相同之处的字符
UPDATE tb_charpter SET charpterName = REPLACE ( charpterName, substring( charpterName, locate('(', charpterName), locate(')', charpterName) - locate('(', charpterName) + 1 ), '' ) WHERE bid = 30105