MS Access StrComp() လုပ်ဆောင်ချက်
ဥပမာ
ကြိုးနှစ်ချောင်းကို နှိုင်းယှဉ်ပါ-
SELECT
StrComp("SQL Tutorial", "SQL Tutorial") AS CompString;
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
StrComp() လုပ်ဆောင်ချက်သည် စာကြောင်းနှစ်ခုကို နှိုင်းယှဉ်သည်။
နှိုင်းယှဉ်မှုကို အခြေခံ၍ ရလဒ်ကို ကိန်းပြည့်အဖြစ် ပြန်ပေးသည်-
- string1 = string2 ဖြစ်ပါက၊ ဤလုပ်ဆောင်ချက်သည် 0 ကို ပြန်ပေးသည်။
- string1 < string2 ဖြစ်ပါက၊ ဤလုပ်ဆောင်ချက်သည် -1 ကို ပြန်ပေးသည်။
- string1 > string2 ဖြစ်ပါက၊ ဤလုပ်ဆောင်ချက်သည် 1 ကို ပြန်ပေးသည်။
- string1 သို့မဟုတ် string2 သည် null ဖြစ်ပါက၊ ဤ function သည် null ဖြစ်သွားသည်။
အထားအသို
StrComp(string1, string2,
compare)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
string1 and string2 | Required. The two strings to compare |
compare | Optional. The type of comparison to perform. Possible values: -1: Uses option compare 0: Binary comparison 1: Textual comparison 2: Comparison based on your database |
နည်းပညာဆိုင်ရာအသေးစိတ်
အလုပ်လုပ်သည်- | Access 2000 မှ |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
ကြိုးနှစ်ချောင်းကို နှိုင်းယှဉ်ပါ-
SELECT StrComp("SQL Tutorial", "SQL") AS CompString;
ဥပမာ
ကြိုးနှစ်ချောင်းကို နှိုင်းယှဉ်ပါ-
SELECT StrComp("SQL", "SQL Tutorial") AS CompString;