MS Access Mid()関数
例
位置3から始まる文字列から文字を抽出します。
SELECT Mid("SQL Tutorial", 3) AS ExtractString;
定義と使用法
Mid()関数は、文字列からいくつかの文字を抽出します(任意の位置から開始)。
構文
Mid(string, start, length)
パラメータ値
Parameter | Description |
---|---|
string | Required. The string to extract from |
start | Required. The start position |
length | Optional. The number of characters to extract. If omitted, this function returns all characters from the start position |
技術的な詳細
で動作します: | Access2000から |
---|
その他の例
例
列のテキストから文字を抽出します(位置4から開始し、6文字を抽出します)。
SELECT Mid(CustomerName, 4, 6) AS ExtractString
FROM Customers;