Home > Database > Mysql Tutorial > mysql中FUNCTION xxx.LEN does not exist错误

mysql中FUNCTION xxx.LEN does not exist错误

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:52:11
Original
3599 people have browsed it

mysql中FUNCTION xxx.LEN does not exist错误 有需要的朋友可参考一下。

今天在mysql想使用自带函数来检测字段内容长度如

 代码如下 复制代码

select id from bb where len(字段)>5

结果出现

FUNCTION xxx.LEN does not exist

经查证原来是 mysql中没有LEN这个函数,那么测试字段长度是那个呢

 代码如下 复制代码

select id from bb where LENGTH(字段)>5

运行结果

OK了

后来查了Length用法

SQL LENGTH() 语法

 代码如下 复制代码

SELECT LENGTH(column_name) FROM table_name


select * from broker_info where LENGTH(avatar)=11


总结

这是用了mssql与mysql时想当然了以mysql中也有len函数,len函数好像只有mssql中有哦。

更多详细内容请查看:

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template