Amaliy ish-4-5-6


mysql> update sportzal set harajat=50000 where id=1


Download 1.3 Mb.
Pdf ko'rish
bet4/5
Sana24.11.2022
Hajmi1.3 Mb.
#930041
1   2   3   4   5
Bog'liq
4-практика№4, Algebra va matematik analiz fanidan lug at (R.Yarqulov, M.Barakayeva), Маъмуралиев Авазбек 1, Мустакил иш, Мустакил иш, Амалиёт-15, fulltext, sss, civil proj advt, civil proj advt, problem, integral tenglamalarni yechish metodlari — копия, VLSI Implementation of Cellular Neural N, Sayt nomi, Sayt nomi
 
mysql> update sportzal set harajat=50000 where id=1; 
Query OK, 1 row affected (0.01 sec) 


Rows matched: 1 Changed: 1 Warnings: 0 
 
mysql> update sportzal set harajat=40000 where id=2; 
Query OK, 0 rows affected (0.00 sec) 
Rows matched: 0 Changed: 0 Warnings: 0 
 
mysql> select*from sportzal; 
+------+-------------------+-----------+--------------+---------+ 
| id | nomi | sportturi | qurilgansana | harajat | 
+------+-------------------+-----------+--------------+---------+ 
| 1 | bunyodkorstadioni | futbol | 2010-10-20 | 50000 | 
| 3 | humoarena | hokkey | 2010-10-20 | NULL | 
+------+-------------------+-----------+--------------+---------+ 
2 rows in set (0.00 sec) 
 
mysql> update sportzal set harajat=40000 where id=3; 
Query OK, 1 row affected (0.00 sec) 
Rows matched: 1 Changed: 1 Warnings: 0 
 
mysql> select*from sportzal; 
+------+-------------------+-----------+--------------+---------+ 
| id | nomi | sportturi | qurilgansana | harajat | 
+------+-------------------+-----------+--------------+---------+ 
| 1 | bunyodkorstadioni | futbol | 2010-10-20 | 50000 | 
| 3 | humoarena | hokkey | 2010-10-20 | 40000 | 
+------+-------------------+-----------+--------------+---------+ 
2 rows in set (0.00 sec) 


 
mysql> select id,sum(harajat) as 'harajat'from sportzal group by id; 
+------+---------+ 
| id | harajat | 
+------+---------+ 
| 1 | 50000 | 
| 3 | 40000 | 

Download 1.3 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2022
ma'muriyatiga murojaat qiling