| Table : Employee | |||||||||
| EmpID | EmpName | Designation | Dept | ApptDate | BirthDate | BasicPay | Status | Gender | |
| 101 | Amrit Pal | Admin | HRD | 7-Jul-2000 | 5-Feb-1969 | 70000 | Permanent | Male | |
| 102 | Amrita Arora | Operator | Software | 8-Apr-2001 | 6-Jun-1974 | 20000 | Permanent | Female | |
| 103 | Anand Raj | Programmer | Software | 5-Aug-1998 | 5-May-1975 | 55000 | Permanent | Male | |
| 104 | Kanika Verma | Programmer | Software | 12-Jun-2003 | 25-Jun-1970 | 50000 | Permanent | Female | |
| 105 | Gopal Rai | Operator | Software | 3-Apr-2000 | 25-Aug-1980 | 25000 | Permanent | Male | |
| 106 | Kishori Lal | Peon | Software | 4-Dec-2006 | 4-Sep-1976 | 15000 | Temporary | Male | |
| 107 | Amritesh Singh | Manager | Software | 15-Jan-2000 | 30-Sep-1976 | 65000 | Permanent | Male | |
| 108 | Reema Pal | Manager | HRD | 2-Feb-2002 | 7-Jul-1981 | 60000 | Permanent | Female | |
| 109 | Nandini Mehta | Assistant | HRD | 23-Jun-2008 | 9-Sep-1974 | 40000 | Temporary | Female | |
| 110 | Komal Arora | Assistant | Software | 24-Feb-2000 | 3-Mar-1971 | 45000 | Permanent | Female | |
| A. Write the SQL statements to do the following tasks : | |||||||||
| 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 : | |||||||||
| 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; | ||||||||
Wednesday, 7 September 2016
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment