摘要:建库:CREATE TABLE temp123 (val varchar(100));插数据:INSERT INTO temp123 VALUES ('123||http://localhost:9999/Upload/Images/ask/2011/7/29/129564046197968750.jpg||456');截取字符串 :SELECT CONCAT( SUBSTRING_INDEX(val, '||', 1),SUBSTRING_INDEX(val, '||', -1)) AS RESULT FROM temp123;结果:返回123
阅读全文
摘要:select * from Main where maistatus like '%1%' and maistatus not in (select maistatus from Main where maistatus like '%10%' or maistatus like '%11%');
阅读全文
摘要:cccc private String infotxt; private String resulttype; public String getResulttype() { return resulttype; } public void setResulttype(String resulttype) { this.resulttype = resulttype; } public String getInfotxt() { return infotxt; } public void s...
阅读全文
摘要:Mysql查询报错Error Code: 1267. Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='0.001 sec提示两个表的编码不一致,需要进行转换将比较等式一边进行字符串转换,如改为ALTER TABLE 表名 CONVERT TO CHARACTERSET utf8 collate utf8_unicode_ci
阅读全文