java aa.substring(3)? aa.substring(3,4)
python aa[2:5]? aa[:2] aa[5:]
javascript 同java
sql? 下標(biāo)從1開始
java:
Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.
Examples:
?"hamburger".substring(4, 8) returns "urge"
?"smiles".substring(1, 5) returns "mile"
?
Parameters:beginIndex the beginning index, inclusive.endIndex the ending index, exclusive.Returns:the specified substring.
SQL中SUBSTRING函數(shù)的用法
功能:返回字符、二進(jìn)制、文本或圖像表達(dá)式的一部分
語法:SUBSTRING ( expression, start, length )
?????????? SQL 中的 substring 函數(shù)是用來抓出一個(gè)欄位資料中的其中一部分。這個(gè)函數(shù)的名稱在不同的資料庫中不完全一樣:
??? MySQL: SUBSTR(), SUBSTRING()
??? Oracle: SUBSTR()
??? SQL Server: SUBSTRING()
posted on 2017-01-21 11:34
鳥生魚湯 閱讀(137)
評(píng)論(0) 編輯 收藏