Integrity constraint can be divided into the following types: - PRIMARY KEY
- UNIQUE
- NULL/NOT NULL
- FOREIGN KEY/REFERENCE
- CHECK
Masalalar - Imtihon jadvalidan baholar sonini aniqlang.
- Fanlar jadvalidan fanlar sonini aniqlang.
- Imtihon jadvalidan eng yuqori baho olgan talaba va 34 soatga teng bo’lgan fanlarni guruhlang.
- Mahsulot jadvalidan mahsulot narxi 500 va 2000 oralig’idagi narxlarni chiqaring.
- Mahsulot jadvalidan eng qimmat mahsulotni aniqlang.
- Mahsulotlar jadvalidan mahsulot narxini o’rtacha qiymatini toping.
- Mahsulot jadvalidan yo’nalishi go’shtga tenglarini aniqlang.
- Mahsulot jadvalidan id si 2 ga teng bo’lmagan va narxi 500 va 2000 oralig’idagi mahsulotlarni aniqlang.
Masalalar - Select count(*) from EXAMS_MARKS ;
- Select count(subj_ID) from SUBJECT;
- Select student_ID, Max(mark) from EXAM_MARKS Group by Subj_name Having max (Hour)>= 34;
- select * from Mahsulotlar where [mahsulot narxi] BETWEEN 500 AND 2000);
- select Max([Mahsulot narxi]) AS [eng qimmat mahsulot narxi] from Mahsulotlar;
- select AVG([Mahsulot narxi]) from mahsulotlar;
- select * from Mahsulotlar where Yunalishlar IN (Gusht);
- select * from Mahsulotlar where [mahsulot narxi] BETWEEN 500 AND 2000) AND NOT Mahsulot_t_id IN (2);
Do'stlaringiz bilan baham: |