MS Access Left() Fungsi
Contoh
Ekstrak 3 karakter dari sebuah string (mulai dari kiri):
SELECT Left("SQL Tutorial", 3) AS ExtractString;
Definisi dan Penggunaan
Fungsi Left() mengekstrak sejumlah karakter dari string (mulai dari kiri).
Catatan: Lihat juga fungsi Right() .
Sintaksis
Left(string, number_of_chars)
Nilai Parameter
Parameter | Description |
---|---|
string | Required. The string to extract from |
number_of_chars | Required. The number of characters to extract. If this parameter is higher than the number of characters in string, this function will return the entire string |
Detail Teknis
Bekerja di: | Dari Akses 2000 |
---|
Lebih Banyak Contoh
Contoh
Ekstrak 5 karakter dari teks di kolom "NamaPelanggan" (dimulai dari kiri):
SELECT Left(CustomerName, 5) AS ExtractString
FROM Customers;