摘要:
建库: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
阅读全文