Set 03
Set 03
1. What is the syntax used to comment on single lines and Multiple Line?
Ans:
Single lines comments: --Today is the 2nd session
Multiple Line comments:
/*
Today is
the 2nd
Session
*/
4. Add additional column MobileNumber on Employee table and add data on the
same column.
Ans: alter table employee add MobileNumber Bigint;
update employee
set MobileNumber = 0406309415
where EmpID = 1
update employee
set MobileNumber = 0452238834
where EmpID = 2
update employee
set MobileNumber =0403070636
where EmpID = 3
update employee
set MobileNumber = 0412356789
where EmpID = 4
6. Write a query to Update Firstname = Ragu and LastName = Shayam for empID
=2.
Ans:
update employee
set FirstName='ragu',
LastName='Shayam'
where empid=2;
8. Write a query to update DimEmployee to store 500 length characters for the
column Title.
SQL Questions Set-03
Ans: