قواعد البيانات
الفصل الخامس
MYSQL
8 x12
A
mysql> select * from tablel where no in (3.7.9);
no ' name
3 : Mohamed Aly
71 Hayam Mohamed NT
9 Hashem Bedir
3 rows in set (0.05 sec) mysql>
degree notes
94 ¦ Alex 72: Alex 66 : Tanta
علامة بين Between :
علامة شرط عند تحقق وجود الشرط بين حدى معاملاتها ، مثال : لعرض بيانات
الطلاب بدرجات بين قيمتين نكتب :
Select * from table1 where degree between 75 and 95;
MS
GMYSQL
8 x12
(0.80 sec)
MOUS In
همه
mysqly select * from tablel uhere degree between 25 and 95;
no
3
4
5
name
: Mohamed Aly :
monir aly
Sayed Ahmed ¦
6 Mosa ahmed
notes
degree
94 : Alex
4 rous in set (0.86 sec)
mysql>
78 Tanta
77
Matbool
83 } Tanta :
يمكن دمج عدة شروط معا ، مثال : عرض بيانات الطلاب لأرقام معينة ، ودرجات
معينة :
مثال آخر :
١٦٢
Select * from table1 where no > 3 and degree > 80;
Select * from table1 where no > 4 or degree < 90;
ص ١٦٢