Computer Science, asked by prmdprem999, 3 months ago

(40)Marks
Question 32.
Write SQL commands for the questions from (1) to (v) on the basis of
table MASTER (containing details of employees)
SNO
Name Age Department
Salary
7
Shyam
21
Computer
12000
2
Shiv
25
Mathematics
15000
3
Rakesh
31
Hindi
14000
4
Sharmila
32
History
20000
5 Dushyant 25
Software
30000
(i) Write a command to update the salary of the employee to 40000,
whose SNO IS 3.
(ii) Write a query to add a column Date_of_Joining to the table
MASTER.
(ili) Select Age, Department of those employees whose salary is
greater than 12000.
(iv) List all data of table MASTER.
(v) Write a query to change the data type of a column Name to char
with size 35.​

Answers

Answered by allysia
25

The SQL statements for this goes as  :

i) Update Master set salary =40000 where SNO =3;

ii) Alter table Master add Date_of_Joining date;

iii) Select Age, Department where salary >12000;

iv) Select * from Master.

v) Alter table Master alter column Name char (35);

Similar questions