FUNCTIONxxx. LENdoesnotexist error in mysql

Source: Internet
Author: User
For more information about the FUNCTIONxxx. LENdoesnotexist error in mysql, see.

In mysql, if the FUNCTION xxx. LEN does not exist error is required, refer to it.

In mysql today, I want to use a built-in function to check the content length of a field, as shown in

The Code is as follows:

Select id from bb where len (field)> 5

Result

FUNCTION xxx. LEN does not exist

It turns out that there is no LEN function in mysql, so what is the length of the test field?

The Code is as follows:

Select id from bb where LENGTH (field)> 5

Running result

OK

Later, I checked the Length usage.

SQL LENGTH () syntax

The Code is as follows:

Select length (column_name) FROM table_name


Select * from broker_info where LENGTH (avatar) = 11


Summary

When mssql and mysql are used, it is assumed that there are also len functions in mysql. len functions seem to only exist in mssql.

For more details, see:

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.