mysql MID() function
Translation results:
英[mɪd] 美[mɪd]
adj. Middle; centered; (used in compound words) in
prep. In the middle of...; in the middle of the sky
adv.In the middle of the hull
n.Mid-year, mid-school year
mysql MID() functionsyntax
Function: is used to extract characters from text fields.
Syntax: SELECT MID(column_name,start[,length]) FROM table_name
Parameters:
Parameters | Description |
column_name | Required. The field from which characters are to be extracted. |
start | Required. Specifies the starting position (starting value is 1). |
length | Optional. The number of characters to return. If omitted, the MID() function returns the remaining text. |
mysql MID() functionexample
//从 "City" 列中提取前 3 个字符 SELECT MID(City,1,3) as SmallCity FROM Persons;
Popular Recommendations
- Decathlon launches two new mid-range BTWIN e-scooters
- Garmin releases new update for mid-range smartwatch with important bug fixes
- HMD Vibe Pro: Specs and pricing leak for unreleased mid-range smartphone
- Vivo X200 and Vivo X200 Pro confirmed for a mid-October launch
- Motorola Razr 50s now official as new mid-range foldable with curious hardware
- Garmin brings over a dozen improvements to popular mid-range smartwatch with new update