SELECT INSTR('1234','2') #returns 2 SELECT LOCATE('2','1234') #returns 2
除了参数编号之外,在选择任何一个函数之前还有任何明显的差异需要注意吗?
-- returns 4 SELECT INSTR("Alibaba","ba") -- returns 4 because the third parameter was not specified SELECT LOCATE("ba","Alibaba") -- returns 6 SELECT LOCATE("ba","Alibaba",5)