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

What is SQL?

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

SQL ဆိုတာ relational database တွေကို မေးခွန်းမေးဖို့၊ data ထည့်ဖို့၊ ပြင်ဖို့၊ ဖျက်ဖို့ အသုံးပြုတဲ့ language ဖြစ်ပါတယ်။ ဥပမာ “Mexico က customer တွေကိုပြပါ”၊ “order အရေအတွက်ရေတွက်ပါ”၊ “ဒီ customer ရဲ့ phone number ပြင်ပါ” ဆိုတဲ့အလုပ်တွေကို SQL query နဲ့ လုပ်နိုင်ပါတယ်။

ဘယ်အချိန်မှာသုံးလဲ?

Admin dashboard မှာ user list ပြချင်တဲ့အခါ၊ sales report ထုတ်ချင်တဲ့အခါ၊ search box ကနေ product ရှာချင်တဲ့အခါ၊ backend API က database ကို data မေးတဲ့အခါ SQL ကိုသုံးပါတယ်။

အရေးကြီးတဲ့အချက်

SELECT * က table ထဲက columns အားလုံးကိုပြပါတယ်။ လေ့လာရာမှာ အဆင်ပြေပေမဲ့ production app တွေမှာလိုအပ်တဲ့ columns ကိုပဲရွေးတာ ပိုမြန်ပြီးပိုသန့်ပါတယ်။

sql
SELECT * FROM Customers;
You should see
What this code does: Customers table ထဲက rows အားလုံးနဲ့ columns အားလုံးကို ထုတ်ပြပါတယ်။ Expected output: Customers table ထဲရှိ customer records များကို table format နဲ့မြင်ရပါမယ်။ Common mistake: Table name မှားရေးခြင်း၊ semicolon မထည့်ခြင်း၊ database ထဲမှာ table မရှိသေးခြင်းတွေကြောင့် error ဖြစ်နိုင်ပါတယ်။
What is SQL? | Thuta Learning