Discover mysql get first letter of string, include the articles, news, trends, analysis and practical advice about mysql get first letter of string on alibabacloud.com
DELIMITER $$DROP FUNCTION IF EXISTS ' fun_getpy ' $$CREATE FUNCTION ' his '. ' Fun_getpy '(In_string VARCHAR (21845))RETURNS VARCHAR (21845) CHARSET UTF8BEGIN#截取字符串, each time the truncated string is stored in the variable, the initial function
How to obtain the first letter of each Chinese character field in mysql, mysql Chinese Character
Drop function if exists 'getpy'; DELIMITER; create function 'getpy' (in_string VARCHAR (65534) RETURNS mediumtext CHARSET utf8 begin declare tmp_str
MySQL常用指令,java,php程序员,数据库工程师必备。程序员小冰常用资料整理MySQL common commands (for reference)The most common display commands are:1. Display the list of databases.show databases;2. Display the data table in the library:Use MySQL;Show tables;3, display the
Mysql> SELECT something from Tbl_name
WHERE To_days (now ()) –to_days (date_col)
DayOfWeek (date)
Returns the week index of date (1 = Sunday, 2 = Monday, ...). 7 = Saturday). Index values are compliant with ODBC standards.
mysql> SELECT DayOfWeek ('
The following query selects the records for all date_col values within the last 30 days.
Mysql> SELECT something from Tbl_name
WHERE To_days (now ())-To_days (Date_col) DayOfWeek (date)
Returns the week index of date (1 = Sunday, 2 = Monday, ...). 7
Example 1
MySQL functional function to achieve Pinyin query:Function: Enter the first letter of each word in Chinese string to retrieve the corresponding data.How to: Use Py directly (field name) = ' keywords '.
The code is as follows
Use of Replace and regexp0 Comments | This entry is posted on APR 08 2010
MySQL Replace usage
1.replace into
Replace into table (Id,name) VALUES (' 1′, ' AA '), (' 2′, ' BB ')
The purpose of this statement is to insert two records into table tables.
This article describes the PHP version of the micro-letter automatic login and get a nickname method. Share to everyone for your reference, specific as follows:
Micro-letter Automatic login and get nickname is through the API interface can be
I. Using String functions1. Combining the String Functions CONCAT () and CONCAT_WS () 1.1 Functions CONCAT () the CONCAT () function joins the passed arguments to return the merged string type data. If one of the parameters is null, the return value
Here is an example of using the date function. The following query Selects all records whose date_col values are within the last 30 days.
Here is an example of using the date function. The following query Selects all records whose date_col values
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.