Select
*
from
subject
order by
semester, subj_name;
Select
subject, semester, subj_name
order by
semester;
6.7. bog‘langan qism so‘rovlar yaratish
SQL tili bitta so‘rov ichiga 2-so‘rovni joylashtirib ishlatish
imkonini beradi. Misol: faraz qilaylik, talabaning «Petrov»
familiyasi ma’lum bo‘lsin, lekin uning STUDENT_ID may-
doni qiymati noma’lum. Shu talabaning barcha baholari haqi-
dagi axborotni (ma’lumotlarni) olish uchun quyidagi so‘rovni
tuzamiz:
Select * from exam_marks
Where student_ID = (select student_ID
from student where surname= 'Petrov') ;
Bog‘langan qism so‘rovli SQL so‘rov quyidagicha ishlaydi:
1.
Do'stlaringiz bilan baham: |