SELECT id_talaba as nomer, familiya, ismi, stipendiya*12 as yil_stipendiya
FROM talaba;
5. Satrlarni tanlash. (WHERE bo`limi)
a) solishtirish predikatini ishlatish
1989-yilda tug`ilgan talabalar ro`yxati chiqarilsin
SELECT id_talaba, familiya,
ismi, sharifi FROM talaba WHERE tug_yil=1989;
1989 yoki 1990-yilda tug`ilgan talabalar ro`yxati chiqarilsin
SELECT id_talaba, familiya, ismi, sharifi, tug_yil
FROM talaba
WHERE tug_yil=1989 OR tug_yil=1990;
Toshkent yoki Samarqand shahridan kelgan va millati o`zbek bo`lgan talabalarni
ro`yxati chiqarilsin.
SELECT id_talaba, familiya, ismi, sharifi,
tug_shahar
FROM talaba
WHERE
(tug_shahar=`Toshkent`
or
tug_shahar=`Samarqand`)
and
Do'stlaringiz bilan baham: |