What is mysqlsubstr usage

The mysql substr function is used to intercept a part of a column field in the database. The commonly used syntax is “SBUSTR(str, pos);”, which means that the position starting from pos has been intercepted to the end. Recommendation: “Mysql Video Tutorial” The SUBSTR function is used to intercept a part of a column field in the database. The function names are different in each database MySQL: SUBSTR( ), SUBSTRING( ) Oracle: SUBSTR( ) SQL Server: SUBSTRING( ) ;123 The commonly used method is: SBUSTR(str,pos); From the position where pos starts, it is intercepted to the end. Another commonly used method is: SUBSTR(str, pos, len); From the position starting from pos, len characters are intercepted (blanks are also counted as characters). Note: The substr() function in mysql is the same as the substr() parameter in hibernate, but the meaning is different. The start in mysql starts from 1, and the start in hibernate starts from 0. The above is the detailed content of the usage of mysql substr. For more information, please pay attention to other related articles on 1024programmer.com!

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索