Wednesday, 7 September 2016

Table : Sargam
AlbumID Album Cost Qty Singer
1001 SAHER 150 4 JAGJEET SINGH
1002 MADHUSHALA 250 2 MANNA DEY
1003 IBADAT 180 6 MOHD.RAFI
1004 KISMAT 180 5 MOHD.RAFI
1005 HALCHAL 200 8 KISHORE KUMAR
1006 BLACK 210 4 MICHEL
1007 PASSION 200 3 SHAKIRA
1008 NAMESAKE 190 3 MADONA
1009 MELODIES 220 7 ASHA BHOSLE
1010 CATWALK 155 5 MADONA
1011 GOLDEN MELODIES 250 10 LATA MANGESHKAR
A. Write the SQL statements to do the following tasks : 5
1 Write the statement to create the above mentioned table
2 Display details of all female employees who are permanent in ascending order of their name
3 Display name, designation and empID of all employees who have joined in the year 2000
4 Display name,designtion and department of all employee having basicpay more than30000 and less 
than 60000
5 Display EmpID, name and Birthdate of all male employees born in the month of september
B. Write the Output generated by the following commands : 3
1 Select Left(empname,5), empID from employee where basic pay>65000;
2 Select empID as "Employee ID", empname, basicpay+1000 from employee where designation="A%";
3 update employee set status ="permanent" where year(apptdate)>2005;

No comments:

Post a Comment