Thuta Learning
ရှာဖွေရန်
BasicData & Databasesbeginner

DISTINCT

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

SELECT DISTINCT ကို duplicate values တွေဖယ်ပြီး မတူညီတဲ့တန်ဖိုးတွေကိုပဲကြည့်ချင်တဲ့အခါသုံးပါတယ်။ Filter dropdown, category list, country list, tag list တွေထုတ်တဲ့အခါ အသုံးဝင်ပါတယ်။

sql
SELECT DISTINCT Country
FROM Customers;
You should see
+---------+ | Country | +---------+ | Germany | | Mexico | | UK | +---------+ What this code does: Mexico customer နှစ်ယောက်ရှိပေမဲ့ Mexico ကိုတစ်ကြိမ်ပဲပြပါတယ်။ Common mistake: Columns နှစ်ခုထည့်ပြီး DISTINCT သုံးရင် column combination တစ်ခုလုံးကို distinct စစ်ပါတယ်။
DISTINCT | Thuta Learning