Vous êtes sur la page 1sur 9

File: /media/chandresh/Chandresh/Co….C.O.

Sem 6/DD/Hospital_11co35 Page 1 of 9

chandresh@chandresh-VirtualBox:~$ mysql -u root -p


Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 60
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

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 |
+--------------------+
| information_schema |
| Hospital_11co35 |
| Management |
| admin |
| mysql |
| performance_schema |
| phpmyadmin |
+--------------------+
7 rows in set (0.14 sec)

mysql> use Hospital_11co35;


Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> create table Doctor(doc_id int(20),doc_name varchar(100),address varchar(100),contact_no


varchar(100),primary key(doc_id));
Query OK, 0 rows affected (0.34 sec)

mysql> show tables;


+---------------------------+
| Tables_in_Hospital_11co35 |
+---------------------------+
| Doctor |
+---------------------------+
1 row in set (0.00 sec)

mysql> create table Patient(doc_id int(20),patient_id int(20),patient_name varchar(100),age


int,sex char,address varchar(100),contact_no varchar(100),reg_date date, dis_date date,primary
key(patient_id), foreign key(doc_id) references Doctor(doc_id));
Query OK, 0 rows affected (0.08 sec)

mysql> show tables;


+---------------------------+
| Tables_in_Hospital_11co35 |
+---------------------------+
| Doctor |
| Patient |
+---------------------------+
2 rows in set (0.00 sec)

mysql> create table Branch(branch_id int(20),doc_id int(20),patient_id int(20),branch_name


varchar(100),address varchar(100),contact_no varchar(100),primary key(branch_id), foreign key(doc_id)
references Doctor(doc_id),foreign key(patient_id) references Patient(patient_id));
Query OK, 0 rows affected (0.04 sec)

mysql> show tables;


+---------------------------+
| Tables_in_Hospital_11co35 |
+---------------------------+
| Branch |
| Doctor |
| Patient |
+---------------------------+
File: /media/chandresh/Chandresh/Co….C.O. Sem 6/DD/Hospital_11co35 Page 2 of 9

3 rows in set (0.00 sec)

mysql> create table Pharmacy(patient_id int(20),buy_date date,particulars varchar(100),rate


decimal,qty int,ammount decimal,foreign key(patient_id) references Patient(patient_id));
Query OK, 0 rows affected (0.12 sec)

mysql> show tables;


+---------------------------+
| Tables_in_Hospital_11co35 |
+---------------------------+
| Branch |
| Doctor |
| Patient |
| Pharmacy |
+---------------------------+
4 rows in set (0.00 sec)

mysql> create table Bill(bill_no int NOT NULL,bill_date date,patient_id int(20),primary


key(bill_no), foreign key (patient_id) references Patient(patient_id));
Query OK, 0 rows affected (0.01 sec)

mysql> show tables;


+---------------------------+
| Tables_in_Hospital_11co35 |
+---------------------------+
| Bill |
| Branch |
| Doctor |
| Patient |
| Pharmacy |
+---------------------------+
5 rows in set (0.00 sec)

mysql> CREATE TABLE Employee(empid int NOT NULL,emp_name varchar(100),counterNo int NOT
NULL,PRIMARY KEY (empid));
Query OK, 0 rows affected (0.02 sec)

mysql> show tables;


+---------------------------+
| Tables_in_Hospital_11co35 |
+---------------------------+
| Bill |
| Branch |
| Doctor |
| Employee |
| Patient |
| Pharmacy |
+---------------------------+
6 rows in set (0.01 sec)

mysql> CREATE TABLE Test(test_id int(100),doc_id int(20),patient_id int(20),test_name


varchar(50),test_result varchar(20),primary key(test_id), foreign key(doc_id) references
Doctor(doc_id), foreign key(patient_id) references Patient(patient_id));
Query OK, 0 rows affected (0.03 sec)

mysql> show tables;


+---------------------------+
| Tables_in_Hospital_11co35 |
+---------------------------+
| Bill |
| Branch |
| Doctor |
| Employee |
| Patient |
| Pharmacy |
| Test |
+---------------------------+
7 rows in set (0.00 sec)

mysql> desc Doctor;


+------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
File: /media/chandresh/Chandresh/Co….C.O. Sem 6/DD/Hospital_11co35 Page 3 of 9

+------------+--------------+------+-----+---------+-------+
| doc_id | int(20) | NO | PRI | 0 | |
| doc_name | varchar(100) | YES | | NULL | |
| address | varchar(100) | YES | | NULL | |
| contact_no | varchar(100) | YES | | NULL | |
+------------+--------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql> insert into Doctor values(1,"Bhavesh","Dahisar",9892381872);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Doctor values(2,"Aishwarya","Kandivli",9819111202);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Doctor values(3,"Sunny","Khar",8080772944);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Doctor values(4,"Jitesh","Andheri",8108071295);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Doctor values(5,"Roshni","Malad",9029070640);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Doctor values(6,"Chandan","Glasgow",7419618758);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Doctor values(7,"Hinal","Nashville",4852201489);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Doctor values(8,"Rohit","Ashokvan",9930407324);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Doctor values(9,"Dinesh","Virar",9920963362);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Doctor values(10,"Kaleem","Kurla",9699951965);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Doctor values(11,"Alam","Santacruz",8692962159);


Query OK, 1 row affected (0.06 sec)

mysql> insert into Doctor values(12,"Boga","Vashi",8356853192);


Query OK, 1 row affected (0.02 sec)

mysql> select * from Doctor;


+--------+-----------+-----------+------------+
| doc_id | doc_name | address | contact_no |
+--------+-----------+-----------+------------+
| 1 | Bhavesh | Dahisar | 9892381872 |
| 2 | Aishwarya | Kandivli | 9819111202 |
| 3 | Sunny | Khar | 8080772944 |
| 4 | Jitesh | Andheri | 8108071295 |
| 5 | Roshni | Malad | 9029070640 |
| 6 | Chandan | Glasgow | 7419618758 |
| 7 | Hinal | Nashville | 4852201489 |
| 8 | Rohit | Ashokvan | 9930407324 |
| 9 | Dinesh | Virar | 9920963362 |
| 10 | Kaleem | Kurla | 9699951965 |
| 11 | Alam | Santacruz | 8692962159 |
| 12 | Boga | Vashi | 8356853192 |
+--------+-----------+-----------+------------+
12 rows in set (0.00 sec)

mysql> desc Patient;


+--------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| doc_id | int(20) | YES | MUL | NULL | |
| patient_id | int(20) | NO | PRI | 0 | |
| patient_name | varchar(100) | YES | | NULL | |
| age | int(11) | YES | | NULL | |
| sex | char(1) | YES | | NULL | |
File: /media/chandresh/Chandresh/Co….C.O. Sem 6/DD/Hospital_11co35 Page 4 of 9

| address | varchar(100) | YES | | NULL | |


| contact_no | varchar(100) | YES | | NULL | |
| reg_date | date | YES | | NULL | |
| dis_date | date | YES | | NULL | |
+--------------+--------------+------+-----+---------+-------+
9 rows in set (0.00 sec)

mysql> insert into Patient values(1,21,"Sandeep",23,"Male","Konknipada",


8695324567,'2015-6-23','2015-7-03');
Query OK, 1 row affected, 1 warning (0.01 sec)

mysql> insert into Patient values(2,22,"Seeta",22,"Female","NG Park",


5426789189,'2015-6-12','2015-7-03');
Query OK, 1 row affected, 1 warning (0.02 sec)

mysql> insert into Patient values(3,23,"Arjun",40,"Male","Suryoday Apt.",


7894561235,'2015-6-22','2015-6-30');
Query OK, 1 row affected, 1 warning (0.26 sec)

mysql> insert into Patient values(4,24,"Milan",30,"Male","Andheri east",


4562563145,'2015-8-13','2015-8-20');
Query OK, 1 row affected, 1 warning (0.02 sec)

mysql> insert into Patient values(5,25,"Ruchika",23,"Female","Nirmal Colony",


9685325698,'2015-9-04','2015-9-12');
Query OK, 1 row affected, 1 warning (0.02 sec)

mysql> insert into Patient values(6,26,"John",32,"Male","Glasgow City",


7854256130,'2015-9-24','2015-10-02');
Query OK, 1 row affected, 1 warning (0.04 sec)

mysql> insert into Patient values(7,27,"Yojna",35,"Female","The Nail",


4852163520,'2016-1-15','2016-1-18');
Query OK, 1 row affected, 1 warning (0.02 sec)

mysql> insert into Patient values(8,28,"Rahul",22,"Male","Ashokvan",


9865723569,'2015-10-05','2015-10-14');
Query OK, 1 row affected, 1 warning (0.00 sec)

mysql> insert into Patient values(9,29,"Vishal",42,"Male","Ranibag",


8245612348,'2015-10-17','2015-10-22');
Query OK, 1 row affected, 1 warning (0.01 sec)

mysql> insert into Patient values(10,30,"Ramu",52,"Male","Pipe Road",


7854965812,'2015-10-28','2015-11-05');
Query OK, 1 row affected, 1 warning (0.02 sec)

mysql> insert into Patient values(11,31,"Javed",33,"Male","Bhopal",


9628784562,'2015-11-10','2015-11-22');
Query OK, 1 row affected, 1 warning (0.01 sec)

mysql> insert into Patient values(12,32,"Ruhi",26,"Female","Bhayndar",


9892564012,'2015-11-25','2015-12-06');
Query OK, 1 row affected, 1 warning (0.01 sec)

mysql> select * from Patient;


+--------+------------+--------------+------+------+---------------+------------+------------
+------------+
| doc_id | patient_id | patient_name | age | sex | address | contact_no | reg_date |
dis_date |
+--------+------------+--------------+------+------+---------------+------------+------------
+------------+
| 1 | 21 | Sandeep | 23 | M | Konknipada | 8695324567 | 2015-06-23 |
2015-07-03 |
| 2 | 22 | Seeta | 22 | F | NG Park | 5426789189 | 2015-06-12 |
2015-07-03 |
| 3 | 23 | Arjun | 40 | M | Suryoday Apt. | 7894561235 | 2015-06-22 |
2015-06-30 |
| 4 | 24 | Milan | 30 | M | Andheri east | 4562563145 | 2015-08-13 |
2015-08-20 |
| 5 | 25 | Ruchika | 23 | F | Nirmal Colony | 9685325698 | 2015-09-04 |
2015-09-12 |
File: /media/chandresh/Chandresh/Co….C.O. Sem 6/DD/Hospital_11co35 Page 5 of 9

| 6 | 26 | John | 32 | M | Glasgow City | 7854256130 | 2015-09-24 |


2015-10-02 |
| 7 | 27 | Yojna | 35 | F | The Nail | 4852163520 | 2016-01-15 |
2016-01-18 |
| 8 | 28 | Rahul | 22 | M | Ashokvan | 9865723569 | 2015-10-05 |
2015-10-14 |
| 9 | 29 | Vishal | 42 | M | Ranibag | 8245612348 | 2015-10-17 |
2015-10-22 |
| 10 | 30 | Ramu | 52 | M | Pipe Road | 7854965812 | 2015-10-28 |
2015-11-05 |
| 11 | 31 | Javed | 33 | M | Bhopal | 9628784562 | 2015-11-10 |
2015-11-22 |
| 12 | 32 | Ruhi | 26 | F | Bhayndar | 9892564012 | 2015-11-25 |
2015-12-06 |
+--------+------------+--------------+------+------+---------------+------------+------------
+------------+
12 rows in set (0.00 sec)

mysql> desc Test;


+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| test_id | int(100) | NO | PRI | 0 | |
| doc_id | int(20) | YES | MUL | NULL | |
| patient_id | int(20) | YES | MUL | NULL | |
| test_name | varchar(50) | YES | | NULL | |
| test_result | varchar(20) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
5 rows in set (0.00 sec)

mysql> insert into Test values(41,1,21,"BloodTest","Positive");


Query OK, 1 row affected (0.02 sec)

mysql> insert into Test values(42,2,22,"CT Health","Negative");


Query OK, 1 row affected (0.18 sec)

mysql> insert into Test values(43,3,23,"Tilt Table","Positive");


Query OK, 1 row affected (0.05 sec)

mysql> insert into Test values(44,4,24,"Heart MRI","Positive");


Query OK, 1 row affected (0.02 sec)

mysql> insert into Test values(45,5,25,"Stress","Negative");


Query OK, 1 row affected (0.02 sec)

mysql> insert into Test values(46,6,26,"ALT","Negative");


Query OK, 1 row affected (0.00 sec)

mysql> insert into Test values(47,7,27,"Imaging","Positive");


Query OK, 1 row affected (0.06 sec)

mysql> insert into Test values(48,8,28,"UrineTest","Negative");


Query OK, 1 row affected (0.12 sec)

mysql> insert into Test values(49,9,29,"Biopsy","Positive");


Query OK, 1 row affected (0.33 sec)

mysql> insert into Test values(50,10,30,"Amylase","Negative");


Query OK, 1 row affected (0.23 sec)

mysql> insert into Test values(51,11,31,"Nysis","Positive");


Query OK, 1 row affected (0.02 sec)

mysql> insert into Test values(52,12,32,"BloodTest","Positive");


Query OK, 1 row affected (0.01 sec)

mysql> select * from Test;


+---------+--------+------------+------------+-------------+
| test_id | doc_id | patient_id | test_name | test_result |
+---------+--------+------------+------------+-------------+
| 41 | 1 | 21 | BloodTest | Positive |
| 42 | 2 | 22 | CT Health | Negative |
File: /media/chandresh/Chandresh/Co….C.O. Sem 6/DD/Hospital_11co35 Page 6 of 9

| 43 | 3 | 23 | Tilt Table | Positive |


| 44 | 4 | 24 | Heart MRI | Positive |
| 45 | 5 | 25 | Stress | Negative |
| 46 | 6 | 26 | ALT | Negative |
| 47 | 7 | 27 | Imaging | Positive |
| 48 | 8 | 28 | UrineTest | Negative |
| 49 | 9 | 29 | Biopsy | Positive |
| 50 | 10 | 30 | Amylase | Negative |
| 51 | 11 | 31 | Nysis | Positive |
| 52 | 12 | 32 | BloodTest | Positive |
+---------+--------+------------+------------+-------------+
12 rows in set (0.00 sec)

mysql> desc Bill;


+------------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------+------+-----+---------+-------+
| bill_no | int(11) | NO | PRI | NULL | |
| bill_date | date | YES | | NULL | |
| patient_id | int(20) | YES | MUL | NULL | |
+------------+---------+------+-----+---------+-------+
3 rows in set (0.00 sec)

mysql> insert into Bill values(61,'2015-07-03',21);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Bill values(62,'2015-07-03',22);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Bill values(63,'2015-06-30',23);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Bill values(64,'2015-08-20',24);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Bill values(65,'2015-09-12',25);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Bill values(66,'2015-10-02',26);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Bill values(67,'2015-01-18',27);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Bill values(68,'2015-10-14',28);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Bill values(69,'2015-10-22',29);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Bill values(70,'2015-11-05',30);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Bill values(71,'2015-11-22',31);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Bill values(72,'2015-12-06',32);


Query OK, 1 row affected (0.01 sec)

mysql> select * from Bill;


+---------+------------+------------+
| bill_no | bill_date | patient_id |
+---------+------------+------------+
| 61 | 2015-07-03 | 21 |
| 62 | 2015-07-03 | 22 |
| 63 | 2015-06-30 | 23 |
| 64 | 2015-08-20 | 24 |
| 65 | 2015-09-12 | 25 |
| 66 | 2015-10-02 | 26 |
| 67 | 2015-01-18 | 27 |
| 68 | 2015-10-14 | 28 |
| 69 | 2015-10-22 | 29 |
File: /media/chandresh/Chandresh/Co….C.O. Sem 6/DD/Hospital_11co35 Page 7 of 9

| 70 | 2015-11-05 | 30 |
| 71 | 2015-11-22 | 31 |
| 72 | 2015-12-06 | 32 |
+---------+------------+------------+
12 rows in set (0.00 sec)

mysql> desc Pharmacy;


+-------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| patient_id | int(20) | YES | MUL | NULL | |
| buy_date | date | YES | | NULL | |
| particulars | varchar(100) | YES | | NULL | |
| rate | decimal(10,0) | YES | | NULL | |
| qty | int(11) | YES | | NULL | |
| ammount | decimal(10,0) | YES | | NULL | |
+-------------+---------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

mysql> insert into Pharmacy values(21,'2015-06-23',"Tablets",112.75,1,112.75);


Query OK, 1 row affected, 2 warnings (0.01 sec)

mysql> insert into Pharmacy values(22,'2015-06-12',"Glucose",100,5,500);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Pharmacy values(23,'2015-06-22',"Tubes",55,5,275);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Pharmacy values(24,'2015-08-13',"Blood",256,2,512);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Pharmacy values(25,'2015-09-04',"Tablets",156.23,3,468.69);


Query OK, 1 row affected, 2 warnings (0.00 sec)

mysql> insert into Pharmacy values(26,'2015-09-24',"Tablets",110,5,550);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Pharmacy values(27,'2016-01-15',"Injections",516,4,2064);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Pharmacy values(28,'2015-10-05',"Creams",152,6,912);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Pharmacy values(29,'2015-10-17',"Glucose",100,2,200);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Pharmacy values(30,'2015-10-28',"Tablets",50,4,200);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Pharmacy values(31,'2015-11-10',"Tablets",92,3,276);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Pharmacy values(32,'2015-11-25',"Injections",215,2,430);


Query OK, 1 row affected (0.01 sec)

mysql> select *from Pharmacy;


+------------+------------+-------------+------+------+---------+
| patient_id | buy_date | particulars | rate | qty | ammount |
+------------+------------+-------------+------+------+---------+
| 21 | 2015-06-23 | Tablets | 113 | 1 | 113 |
| 22 | 2015-06-12 | Glucose | 100 | 5 | 500 |
| 23 | 2015-06-22 | Tubes | 55 | 5 | 275 |
| 24 | 2015-08-13 | Blood | 256 | 2 | 512 |
| 25 | 2015-09-04 | Tablets | 156 | 3 | 469 |
| 26 | 2015-09-24 | Tablets | 110 | 5 | 550 |
| 28 | 2015-10-05 | Creams | 152 | 6 | 912 |
| 29 | 2015-10-17 | Glucose | 100 | 2 | 200 |
| 30 | 2015-10-28 | Tablets | 50 | 4 | 200 |
| 31 | 2015-11-10 | Tablets | 92 | 3 | 276 |
| 32 | 2015-11-25 | Injections | 215 | 2 | 430 |
| 27 | 2016-01-15 | Injections | 516 | 4 | 2064 |
+------------+------------+-------------+------+------+---------+
File: /media/chandresh/Chandresh/Co….C.O. Sem 6/DD/Hospital_11co35 Page 8 of 9

12 rows in set (0.00 sec)

mysql> desc Branch;


+-------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| branch_id | int(20) | NO | PRI | 0 | |
| doc_id | int(20) | YES | MUL | NULL | |
| patient_id | int(20) | YES | MUL | NULL | |
| branch_name | varchar(100) | YES | | NULL | |
| address | varchar(100) | YES | | NULL | |
| contact_no | varchar(100) | YES | | NULL | |
+-------------+--------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

mysql> insert into Branch values(91,1,21,"B1","Dahisar",022-28961978);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Branch values(92,2,22,"B2","Kandivli",022-28961979);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Branch values(93,3,23,"B3","Khar",022-28961980);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Branch values(94,4,24,"B4","Andheri",022-28961981);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Branch values(95,5,25,"B5","Malad",022-28961982);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Branch values(96,6,26,"B6","Glasgow",44-789456123);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Branch values(97,7,27,"B7","Nashville",102-4455667788);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Branch values(98,8,28,"B8","Ashokvan",022-28961983);


Query OK, 1 row affected (0.01 sec)

mysql> insert into Branch values(99,9,29,"B9","Virar",022-28961984);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Branch values(100,10,30,"B10","Kurla",022-28961985);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Branch values(101,11,31,"B11","Santacruz",022-28961986);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Branch values(102,12,32,"B12","Vashi",022-28961987);


Query OK, 1 row affected (0.00 sec)

mysql> select *from Branch;


+-----------+--------+------------+-------------+-----------+-------------+
| branch_id | doc_id | patient_id | branch_name | address | contact_no |
+-----------+--------+------------+-------------+-----------+-------------+
| 91 | 1 | 21 | B1 | Dahisar | -28961956 |
| 92 | 2 | 22 | B2 | Kandivli | -28961957 |
| 93 | 3 | 23 | B3 | Khar | -28961958 |
| 94 | 4 | 24 | B4 | Andheri | -28961959 |
| 95 | 5 | 25 | B5 | Malad | -28961960 |
| 96 | 6 | 26 | B6 | Glasgow | -789456079 |
| 97 | 7 | 27 | B7 | Nashville | -4455667686 |
| 98 | 8 | 28 | B8 | Ashokvan | -28961961 |
| 99 | 9 | 29 | B9 | Virar | -28961962 |
| 100 | 10 | 30 | B10 | Kurla | -28961963 |
| 101 | 11 | 31 | B11 | Santacruz | -28961964 |
| 102 | 12 | 32 | B12 | Vashi | -28961965 |
+-----------+--------+------------+-------------+-----------+-------------+
12 rows in set (0.00 sec)

mysql> desc Employee;


+-----------+--------------+------+-----+---------+-------+
File: /media/chandresh/Chandresh/Co….C.O. Sem 6/DD/Hospital_11co35 Page 9 of 9

| Field | Type | Null | Key | Default | Extra |


+-----------+--------------+------+-----+---------+-------+
| empid | int(11) | NO | PRI | NULL | |
| emp_name | varchar(100) | YES | | NULL | |
| counterNo | int(11) | NO | | NULL | |
+-----------+--------------+------+-----+---------+-------+
3 rows in set (0.00 sec)

mysql> insert into Employee values(111,"Ashish",1);


Query OK, 1 row affected (0.02 sec)

mysql> insert into Employee values(112,"Rahul",2);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Employee values(113,"Deepu",3);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Employee values(114,"Dinesh",4);


Query OK, 1 row affected (0.00 sec)

mysql> insert into Employee values(115,"Ravi",5);


Query OK, 1 row affected (0.00 sec)

mysql> select *from Employee;


+-------+----------+-----------+
| empid | emp_name | counterNo |
+-------+----------+-----------+
| 111 | Ashish | 1 |
| 112 | Rahul | 2 |
| 113 | Deepu | 3 |
| 114 | Dinesh | 4 |
| 115 | Ravi | 5 |
+-------+----------+-----------+
5 rows in set (0.00 sec)

Vous aimerez peut-être aussi