Microsoft Windows
Microsoft Windows
3570]
C:\xampp\mysql\bin>mysql -u root -p
Enter password:
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
+--------------------+
| Database |
+--------------------+
| db_demo |
| db_laravel |
| db_one |
| dbcontact |
| dbmyshop |
| dbpractice |
| dbtest |
| hr |
| information_schema |
| laravel |
| max_db |
| mydb |
| mysql |
| performance_schema |
| phpmyadmin |
| school |
+--------------------+
Database changed
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your
MariaDB server version for the right syntax to use near 'tabels' at line 1
+------------------+
| Tables_in_school |
+------------------+
|a |
| asd |
| asda |
| dishes |
| faculty |
| helloa |
| lab_number |
| maaz |
| users |
+------------------+
| id | dish_name |
+----+----------------+
| 1 | Biryani |
| 2 | qourma |
| 3 | chicken karhai |
| 4 | Mutton Karahi |
| 5 | CHAPLI KABAB |
+----+----------------+
+----+-----------+
| id | dish_name |
+----+-----------+
| 1 | Biryani |
+----+-----------+
+----+--------------+
| id | dish_name |
+----+--------------+
| 5 | CHAPLI KABAB |
+----+--------------+
+----+----------------+
| id | dish_name |
+----+----------------+
| 3 | chicken karhai |
| 5 | CHAPLI KABAB |
+----+----------------+
+----+--------------+
| id | dish_name |
+----+--------------+
| 5 | CHAPLI KABAB |
+----+--------------+
+----+----------------+
| id | dish_name |
+----+----------------+
| 3 | chicken karhai |
+----+----------------+
+----+----------------+
| id | dish_name |
+----+----------------+
| 3 | chicken karhai |
+----+----------------+
+----+----------------+
| id | dish_name |
+----+----------------+
| 3 | chicken karhai |
+----+----------------+
+----+--------------+
| id | dish_name |
+----+--------------+
| 5 | CHAPLI KABAB |
+----+--------------+
+----+--------------+
| id | dish_name |
+----+--------------+
| 5 | CHAPLI KABAB |
+----+--------------+
+----+----------------+
| id | dish_name |
+----+----------------+
| 3 | chicken karhai |
+----+----------------+
+------------------+
| Tables_in_school |
+------------------+
|a |
| asd |
| asda |
| dishes |
| faculty |
| helloa |
| lab_number |
| maaz |
| users |
+------------------+
+----+--------+----------+
| id | name | order_id |
+----+--------+----------+
| 2 | MAAZ | 4|
| 3 | OSAMA | 4|
| 4 | ali | 3|
| 5 | aliyan | 2|
| 6 | almas | 2|
| 7 | maaz | 1|
+----+--------+----------+
+----+--------+----------+
| id | name | order_id |
+----+--------+----------+
| 4 | ali | 3|
| 5 | aliyan | 2|
+----+--------+----------+
+----+----------------+
| id | dish_name |
+----+----------------+
| 3 | chicken karhai |
| 4 | Mutton Karahi |
| 5 | CHAPLI KABAB |
+----+----------------+
+------------+
| ceil(24.4) |
+------------+
| 25 |
+------------+
+--------+
| answer |
+--------+
| 25 |
+--------+
+--------+
| answer |
+--------+
| 8|
+--------+
+--------+
| answer |
+--------+
| 256 |
+--------+
+-------------+
| floor(54.9) |
+-------------+
| 54 |
+-------------+
+----------+
| pi() |
+----------+
| 3.141593 |
+----------+
+---------+
| sqrt(4) |
+---------+
| 2|
+---------+
| round(52.5) |
+-------------+
| 53 |
+-------------+
+----+----------------+
| id | dish_name |
+----+----------------+
| 1 | Biryani |
| 2 | qourma |
| 3 | chicken karhai |
| 4 | Mutton Karahi |
| 5 | CHAPLI KABAB |
+----+----------------+
+-----------+
| count(id) |
+-----------+
| 5|
+-----------+
+---------+
| min(id) |
+---------+
| 1|
+---------+
+---------+
| max(id) |
+---------+
| 5|
+---------+
+---------+
| sum(id) |
+---------+
| 15 |
+---------+
+---------+
| avg(id) |
+---------+
| 3.0000 |
+---------+
-> id int
-> ,
-> );
+------+--------------+--------+
| id | user_name | salary |
+------+--------------+--------+
+------+--------------+--------+
+------+-----------+--------+
| id | user_name | salary |
+------+-----------+--------+
| NULL | UNZILA | 50000 |
+------+-----------+--------+
MariaDB [school]> select * from salary where salary =(select min(salary) from salary);
+------+--------------+--------+
| id | user_name | salary |
+------+--------------+--------+
+------+--------------+--------+
+-------------+
| min(salary) |
+-------------+
| 100000 |
+-------------+
MariaDB [school]>