Q3.
Write the queries for Table Creation & insertion:
Table Name: Employee
E_i E_Na Ag Salar Dept_
d me e y id
1400 01
1 Ammu 61
0
Shank 4400 04
2 34
ar 0
7800 03
3 Hrithik 45
0
5600 02
4 Muthu 39
0
4000 04
5 Minu 34
0
Table Name: Dept
D_i D_name
d
01 Testing
02 Analyst
03 Training
04 Development
Create all the above tables with constraints.
Primary Key: E_id , D_ID
Not Null : Name
Check: Salary should not more than Rs. 100000/-
You have to provide queries on table creation, value insertion
and finally, display the entire table with values.
.
Q4. Write a query in SQL to count the number of employees in
the employee table.