Enter password: Welcome to the Mysql monitor. Commands end with; or \g


Download 14.38 Kb.
Sana30.04.2023
Hajmi14.38 Kb.
#1414782
Bog'liq
bazasi


Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.31 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| futbol |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.04 sec)

mysql> use futbol;


Database changed
mysql> create table club(id int,ismi varchar(20),davlati varchar(20));
Query OK, 0 rows affected (0.06 sec)

mysql> insert into club values(1,"messi","argentina"),(2,"ronaldu","portugaliya"),(3,"neymar","braziliya");


Query OK, 3 rows affected (0.01 sec)
Records: 3 Duplicates: 0 Warnings: 0

mysql> select*from club;


+------+---------+-------------+
| id | ismi | davlati |
+------+---------+-------------+
| 1 | messi | argentina |
| 2 | ronaldu | portugaliya |
| 3 | neymar | braziliya |
+------+---------+-------------+
3 rows in set (0.00 sec)

mysql> select id, rand(id), round (rand(id),2) from club;


+------+---------------------+--------------------+
| id | rand(id) | round (rand(id),2) |
+------+---------------------+--------------------+
| 1 | 0.40540353712197724 | 0.41 |
| 2 | 0.6555866465490187 | 0.66 |
| 3 | 0.9057697559760601 | 0.91 |
+------+---------------------+--------------------+
3 rows in set (0.01 sec)

mysql> select id,power(id,2),power(id,3) from club;


+------+-------------+-------------+
| id | power(id,2) | power(id,3) |
+------+-------------+-------------+
| 1 | 1 | 1 |
| 2 | 4 | 8 |
| 3 | 9 | 27 |
+------+-------------+-------------+
3 rows in set (0.04 sec)

mysql> select id,sqrt(id) from club;


+------+--------------------+
| id | sqrt(id) |
+------+--------------------+
| 1 | 1 |
| 2 | 1.4142135623730951 |
| 3 | 1.7320508075688772 |
+------+--------------------+
3 rows in set (0.01 sec)

mysql> select id, sin(id),cos(id),log(id) from club;


+------+--------------------+---------------------+--------------------+
| id | sin(id) | cos(id) | log(id) |
+------+--------------------+---------------------+--------------------+
| 1 | 0.8414709848078965 | 0.5403023058681398 | 0 |
| 2 | 0.9092974268256817 | -0.4161468365471424 | 0.6931471805599453 |
| 3 | 0.1411200080598672 | -0.9899924966004454 | 1.0986122886681098 |
+------+--------------------+---------------------+--------------------+
Download 14.38 Kb.

Do'stlaringiz bilan baham:




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