当前位置:网站首页>SQL intercepts the data before and after the '.'

SQL intercepts the data before and after the '.'

2020-11-09 22:26:00 Game life

-- take '.' Data before substr( Field , The starting position , End position ) locate('.',name): Get the following table of characters
 

SELECT *,(substr(name,1,locate('.',name)-1)) as namex FROM file_selection WHERE xxxxx='0';
SELECT *,(substr(name,locate('.',name)-1),length(name)) as namex FROM file_selection WHERE xxxxx='0';

 

版权声明
本文为[Game life]所创,转载请带上原文链接,感谢