MS Access Right ()ฟังก์ชั่น
ตัวอย่าง
แยกอักขระ 4 ตัวออกจากสตริง (เริ่มจากด้านขวา):
SELECT
Right("SQL Tutorial is cool", 4) AS ExtractString;
ความหมายและการใช้งาน
ฟังก์ชัน Right() จะแยกอักขระจำนวนหนึ่งออกจากสตริง (เริ่มจากด้านขวา)
หมายเหตุ:ดูฟังก์ชันLeft() ด้วย
ไวยากรณ์
Right(string, number_of_chars)
ค่าพารามิเตอร์
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 |
รายละเอียดทางเทคนิค
ทำงานใน: | จากการเข้าถึง 2000 |
---|
ตัวอย่างเพิ่มเติม
ตัวอย่าง
แยกอักขระ 5 ตัวจากข้อความในคอลัมน์ "CustomerName" (เริ่มจากด้านขวา):
SELECT Right(CustomerName, 5) AS ExtractString
FROM Customers;