Get the App
SLTechnology News&Howtos  ›  Database  › 

How to intercept a string when querying in mysql

Shulou Source: shulou.com Published: 2022-05-31 19:42:34 11月23日 Update

This article is to share with you about how to intercept strings when querying in mysql. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.

SELECT substring_index (wantclass, 1) AS wclass FROM bd_resume WHERE user_id = 42

Wantclass is the field name corresponding to the string to be intercepted

For what is the key character to intercept a character

1 is the position where the key characters appear

The above is how to intercept strings when querying in mysql. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Characters strings queries keys more knowledge articles utility location fields that is work meetings articles look knowledge points industry details information channels follow Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information NVidia Shulou Technology MySQL MariaDB