Computer Science, asked by nehamaheshwari624, 8 months ago

Create the following table named Employee.
Field Name
Data Type
Size
Remark

Empid
Number
5
Primary Key

FName
Varchar
20


Mname
Varchar
20


SName
Varchar
20


Dno
Varchar
5
Should start with character ‘D’

DOB
Date

Should not take null value

DOJ
Date

Should not take null value & Should later than Date Of Birth

Salary
Number
7
Should take only +ve value

City
Varchar
15
Should not take null value & values should take metro names


b) Write the SQL commands for the following
Display empid, name and bonus for each employee.(Note – Bonus is 10% of the salary).
Increase the salary of each employee by 1000.
Display the year of service and age of each employee.
Delete the employee details whose salary is less than 5000.
Delete all the employee records.
Rename the table to EMP.
Add a new column mobno for storing mobile number of the employees.
Change the data type of the field empid, number to varchar with size 5.
Delete the existence of the table.​

Answers

Answered by Anonymous
0

Answer:

In the previous chapter we have learned how to create a database on the database server. Now it's time to create some tables inside our database that will actually hold the data. A database table simply organizes the information into rows and columns.

Similar questions