function xxx in MySQL. LEN does not exist error

Source: Internet
Author: User
Tags mssql

Today in MySQL want to use a self-contained function to detect the length of the field content as

The code is as follows Copy Code

Select ID from BB where len (field) >5

Results appear

FUNCTION xxx. LEN does not exist

Verified that there is no Len this function in MySQL, then the test field length is that?

The code is as follows Copy Code

Select ID from BB where LENGTH (field) >5

Run results

Okay, OK.

And then I checked the length usage.

SQL LENGTH () syntax

The code is as follows Copy Code

SELECT LENGTH (column_name) from table_name


SELECT * from Broker_info where LENGTH (avatar) =11


Summarize

This is the use of MSSQL and MySQL when taken for granted in MySQL also has Len function, Len function seems to have only the MSSQL OH.

For more details please see: http://www.111cn.net/database/mysql/38578.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.