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 စစ်ပါတယ်။