create database library;
Query OK, 1 row affected (0.00 sec)
use library;
Database changed
create table LIBRARYBOOKS
-> (
-> Accession_no int(20) PRIMARY KEY,
-> Title varchar(20),
-> Author varchar(20),
-> Department varchar(20),
-> DOP date,
-> Price int(10)
-> );
mysql> desc LIBRARYBOOKS;
+--------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-------------+------+-----+---------+-------+
| Accession_no | int(20) | NO | PRI | NULL | |
| Title | varchar(20) | YES | | NULL | |
| Author | varchar(20) | YES | | NULL | |
| Department | varchar(20) | YES | | NULL | |
| DOP | date | YES | | NULL | |
| Price | int(10) | YES | | NULL | |
+--------------+-------------+------+-----+---------+-------+
6 rows in set (0.05 sec)
mysql> insert into LIBRARYBOOKS values(1001,'MULTIMEDIA','Tay
Vaugan','Mathematics','2000-09-20',300);
Query OK, 1 row affected (0.01 sec)
mysql> insert into LIBRARYBOOKS
values(1002,'ALGEBRA','R.Kumar','Mathematics','2004-05-13',180);
Query OK, 1 row affected (0.22 sec)
mysql> insert into LIBRARYBOOKS values(1003,'Micro
Economics','Forte','Economics','2004-10-14',500);
Query OK, 1 row affected (0.00 sec)
mysql> insert into LIBRARYBOOKS values(1004,'Our
Surrounding','A.Kaushik','EVS','2006-05-25',300);
Query OK, 1 row affected (0.01 sec)
mysql> insert into LIBRARYBOOKS values(1005,'Hindi Bhasha B','Dr. Mohm.
Shabbir','Hindi','1997-02-03',150);
Query OK, 1 row affected (0.00 sec)
mysql> select * from LIBRARYBOOKS;
+--------------+-----------------+-------------------+-------------+------------
+-------+
| Accession_no | Title | Author | Department | DOP |
Price |
+--------------+-----------------+-------------------+-------------+------------
+-------+
| 1001 | MULTIMEDIA | Tay Vaugan | Mathematics | 2000-09-20 |
300 |
| 1002 | ALGEBRA | R.Kumar | Mathematics | 2004-05-13 |
180 |
| 1003 | Micro Economics | Forte | Economics | 2004-10-14 |
500 |
| 1004 | Our Surrounding | A.Kaushik | EVS | 2006-05-25 |
300 |
| 1005 | Hindi Bhasha B | Dr. Mohm. Shabbir | Hindi | 1997-02-03 |
150 |
+--------------+-----------------+-------------------+-------------+------------
+-------+
5 rows in set (0.00 sec)