0% found this document useful (0 votes)
9 views

DB6 output

The document provides a detailed overview of two MySQL tables: an Employee table and a Student table. It includes the structure of the tables, sample data entries, and various SQL query results showing the manipulation of records. The Employee table contains fields such as empno, empname, desig, dept, age, and place, while the Student table includes regno, name, age, dept, and class.

Uploaded by

Durga Kanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

DB6 output

The document provides a detailed overview of two MySQL tables: an Employee table and a Student table. It includes the structure of the tables, sample data entries, and various SQL query results showing the manipulation of records. The Employee table contains fields such as empno, empname, desig, dept, age, and place, while the Student table includes regno, name, age, dept, and class.

Uploaded by

Durga Kanda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DB6 – MYSQL Employee Table

1. Query OK, 1 row affected (0.00 sec) 12.

+-------+----------+---------+----------+------+----------+
2. Database changed | empno | empname | desig | dept | age | place |
+-------+----------+---------+----------+------+---------+
3. | 1221 | sidharth | officer | accounts | 45 | salem |
+--------------------+ | 1222 | naveen | manager | admin | 32 | erode |
| Database | | 1223 | ramesh | clerk | accounts | 33 | ambathur
+--------------------+ |
| emp | | 1224 | abinaya | manager | admin | 28 |
| mysql | annanagar |
| performance_schema | | 1225 | rahul | officer | accounts | 31 | annanagar |
| stdb | +-------+----------+---------+----------+------+----------+
| sys | 5 rows in set (0.00 sec)
+--------------------+
5 rows in set (0.03 sec) Adding two more records
13. Query OK, 1 row affected (0.00 sec)
4. Query OK, 0 rows affected (0.03 sec)
14. Query OK, 1 row affected (0.00 sec)
5.
+---------------------+
| Tables_in_empd |
15.
+-------+----------+---------+----------+------+---------+
+----------------------+
| empno | empname | desig | dept | age | place |
| emp |
+-------+----------+---------+----------+------+---------+
+----------------+
| 1221 | sidharth | officer | accounts | 45 | salem |
1 row in set (0.00 sec)
| 1222 | naveen | manager | admin | 32 | erode |
| 1223 | ramesh | clerk | accounts | 33 | ambathur
6. |
+---------+-------------+------+-----+---------+-------+ | 1224 | abinaya | manager | admin | 28 |
| Field | Type | Null | Key | Default | Extra | annanagar |
+---------+-------------+------+-----+---------+-------+ | 1225 | rahul | officer | accounts | 31 | annanagar |
| empno | int(4) | NO | PRI | NULL | | | 3226 | sona | manager | accounts | 42 | erode |
| empname | varchar(20) | YES | | NULL | | | 3227 | rekha | officer | admin | 34 | salem |
| desig | varchar(10) | YES | | NULL | | +-------+----------+---------+----------+------+--------+
| dept | varchar(10) | YES | | NULL | | 7 rows in set (0.00 sec)
| age | int(2) | YES | | NULL | |
| place | varchar(10) | YES | | NULL | | 16. Query OK, 7 rows affected (0.05 sec)
+---------+-------------+------+-----+---------+-------+ Records: 7 Duplicates: 0 Warnings: 0
6 rows in set (0.00 sec)
17.
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
7. Query OK, 1 row affected (0.00 sec) +---------+-------------+------+-----+---------+-------+
| empno | int(4) | NO | PRI | NULL | |
8. Query OK, 1 row affected (0.00 sec) | empname | varchar(20) | YES | | NULL | |
| desig | varchar(10) | YES | | NULL | |
9. Query OK, 1 row affected (0.00 sec) | dept | varchar(10) | YES | | NULL | |
| age | int(2) | YES | | NULL | |
| place | varchar(10) | YES | | NULL | |
10. Query OK, 1 row affected (0.00 sec) | doj | date | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
11. Query OK, 1 row affected (0.00 sec) 7 rows in set (0.00 sec)
18.
+-------+----------+-------+-------+------+-------+------+ 26.
| empno | empname | desig | dept | age | place | +-------+--------+-------+-------+------+--------+-------+
doj | | empno | empname | desig | dept | age | place| doj
+-------+----------+-------+-------+----+--------+------+ |
| 1221 | sidharth | officer | accounts | 45 | salem | +-------+-------+------+-------+------+-------+----------+
NULL | | 1221 | sidharth | officer | accounts | 45 | salem |
| 1222 | naveen | manager | admin | 32 | erode | 2010-03-21 |
NULL | | 1222 | naveen | manager | admin | 32 | erode |
| 1223 | ramesh | clerk | accounts | 33 | ambathur 2010-02-24 |
| NULL | | 1223 | ramesh | clerk | accounts | 33 | ambathur
| 1224 | abinaya | manager | admin | 28 | | 2017-05-21 |
annanagar | NULL | | 1224 | abinaya | manager | admin | 28 |
| 1225 | rahul | officer | accounts | 31 | annanagar | annanagar | 2019-03-22 |
NULL | | 1225 | rahul | officer | accounts | 31 | annanagar |
| 3226 | sona | manager | accounts | 42 | erode | 2019-08-02 |
NULL | | 3226 | sona | manager | accounts | 42 | erode |
| 3227 | rekha | officer | admin | 34 | salem | 2019-04-03 |
NULL | | 3227 | rekha | officer | admin | 34 | salem |
+-------+-------+------+-------+------+---------+------+ 2012-03-03 |
7 rows in set (0.00 sec) +-------+--------+------+-------+------+-------+--------+
7 rows in set (0.00 sec)

19. Query OK, 1 row affected (0.00 sec) 27. Empty set (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
28.
20. Query OK, 1 row affected (0.00 sec)
+-------+-------+-------+--------+------+-------+--------+
Rows matched: 1 Changed: 1 Warnings: 0
| empno | empname | desig | dept | age | place| doj
|
21. Query OK, 1 row affected (0.00 sec)
+-------+------+------+------+------+------+------------+
Rows matched: 1 Changed: 1 Warnings: 0
| 1224 | abinaya | manager | admin | 28 |
annanagar | 2019-03-22 |
22. Query OK, 1 row affected (0.00 sec)
| 1225 | rahul | officer | accounts | 31 | annanagar |
Rows matched: 1 Changed: 1 Warnings: 0
2019-08-02 |
| 3226 | sona | manager | accounts | 42 | erode |
23.Query OK, 1 row affected (0.00 sec)
2019-04-03 |
Rows matched: 1 Changed: 1 Warnings: 0
+-------+---------+---------+----------+------+---------+
3 rows in set (0.00 sec)
24. Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

25. Query OK, 1 row affected (0.00 sec)


Rows matched: 1 Changed: 1 Warnings: 0
DB7 – MYSQL Student Table
14.
+-------+--------+------+------+-------+
1. Query OK, 1 row affected (0.10 sec) | regno | name | age | dept | class |
+-------+--------+------+------+-------+
2. Database changed | m1001 | harish | 19 | ME | ME1 |
| m1002 | akash | 20 | ME | ME2 |
| c1001 | sneha | 20 | CSE | CS1 |
3.
| c1002 | lithya | 19 | CSE | CS2 |
+--------------------+
| e1002 | leena | 21 | EEE | EE1 |
| Database |
| e1001 | ravi | 20 | ECE | EC1 |
+--------------------+
| e1003 | rose | 20 | ECE | EC2 |
| information_schema |
+-------+--------+------+------+-------+
| em |
7 rows in set (0.00 sec)
| empd |
| mysql |
| performance_schema |
15.
| studentd |
+-------+--------+------+------+-------+
| sys |
| regno | name | age | dept | class |
+--------------------+
+-------+--------+------+------+-------+
6 rows in set (0.06 sec)
| c1001 | sneha | 20 | CSE | CS1 |
4. Query OK, 0 rows affected (0.16 sec) | c1002 | lithya | 19 | CSE | CS2 |
+-------+--------+------+------+-------+
2 rows in set (0.03 sec)
5.
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra | 16.
+-------+-------------+------+-----+---------+-------+ +-------+-------+------+------+-------+
| regno | char(5) | YES | | NULL | | | regno | name | age | dept | class |
| name | varchar(20) | YES | | NULL | | +-------+-------+------+------+-------+
| age | int(2) | YES | | NULL | | | m1002 | akash | 20 | ME | ME2 |
| dept | varchar(10) | YES | | NULL | | +-------+-------+------+------+-------+
| class | char(3) | YES | | NULL | | 1 row in set (0.03 sec)
+-------+-------------+------+-----+---------+-------+
5 rows in set (0.10 sec)

6. Empty set (0.02 sec)


17.
7. Query OK, 1 row affected (0.05 sec) +-------+--------+------+------+-------+
| regno | name | age | dept | class |
8. Query OK, 1 row affected (0.00 sec) +-------+--------+------+------+-------+
| m1001 | harish | 19 | ME | ME1 |
9. Query OK, 1 row affected (0.00 sec) | e1002 | leena | 21 | EEE | EE1 |
| e1001 | ravi | 20 | ECE | EC1 |
10. Query OK, 1 row affected (0.00 sec) | c1001 | sneha | 20 | CSE | CS1 |
+-------+--------+------+------+-------+
11. Query OK, 1 row affected (0.00 sec) 4 rows in set (0.05 sec)

12. Query OK, 1 row affected (0.00 sec) 18.


Query OK, 1 rows affected (0.11 sec)
13. Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0
19.
+-------+--------+------+------+-------+
| regno | name | age | dept | class |
+-------+--------+------+------+-------+
| m1001 | harish | 19 | ME | ME1 |
| m1002 | akash | 20 | ME | ME1 |
| c1001 | sneha | 20 | CSE | CS1 |
| c1002 | lithya | 19 | CSE | CS2 |
| e1002 | leena | 21 | EEE | EC1 |
| e1001 | ravi | 20 | ECE | EE1 |
| e1003 | rose | 20 | ECE | EC2 |
+-------+--------+------+------+-------+
7 rows in set (0.00 sec)

20.
+-------+
| regno |
+-------+
| m1001 |
| m1002 |
| c1001 |
| c1002 |
| e1002 |
| e1001 |
| e1003 |
+-------+
7 rows in set (0.00 sec)

You might also like