Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 8.0.36 MySQL Community Server - GPL
Copyright (c) 2000, 2024, 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> CREATE DATABASE testdatabase;
Query OK, 1 row affected (0.01 sec)
mysql> USE testdatabase;
Database changed
mysql> CREATE TABLE library(Id integer Primary Key, Name varchar(100), title varchar(100),author
varchar(100),price integer, qty integer) ;
Query OK, 0 rows affected (0.09 sec)
mysql> desc library;
+--------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+--------------+------+-----+---------+-------+
| Id | int | NO | PRI | NULL | |
| Name | varchar(100) | YES | | NULL | |
| title | varchar(100) | YES | | NULL | |
| author | varchar(100) | YES | | NULL | |
| price | int | YES | | NULL | |
| qty | int | YES | | NULL | |
+--------+--------------+------+-----+---------+-------+
6 rows in set (0.02 sec)
mysql> SHOW VARIABLES WHERE Variable_name = 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.02 sec)
mysql> select * from library;
+---------+----------+---------------+----------+-------+------+
| Id | Name | title | author | price | qty |
+---------+----------+---------------+----------+-------+------+
| 123 | Chandana | Corporate Law | xyz | 180 | 1 |
| 23456 | ABC | port | eeee | 456 | 2 |
| 7878787 | YYYYYU | sdfsfsdfdsf | sdfsdfsd | 45454 | 2 |
+---------+----------+---------------+----------+-------+------+
3 rows in set (0.00 sec)
mysql>