The document provides a table called EMP with employee data like employee number, name, job, manager, hire date, salary, commission, and department number. It then lists 22 questions to query the EMP table.
Download as DOCX, PDF, TXT or read online on Scribd
50%(2)50% found this document useful (2 votes)
391 views
Assignment SQL
The document provides a table called EMP with employee data like employee number, name, job, manager, hire date, salary, commission, and department number. It then lists 22 questions to query the EMP table.
2. Display employee number, name and salary of all employee. 3. Display employee no., name and 10% of salary for each emplaoyee for earthquake fund who joined before 2001. 4. To display the detail of employees whose salary is not more than 15000. 5. Display name and salary of all employees whose salary is greater then equal to 20000. 6. Display employee no and name of employees whose deptno is 30 and salary more than 15000 7. Display all the information except ‘Jagdish Rana’. 8. Display the employee name either ‘Sumit Vats’ or ‘Chetan Gupta’. 9. Display the detail of employees whose commission is NULL. 10.Display distinct department from the table. 11.Display employee no., name and salary of all employees whose salary between 15000 and 20000. 12.To display employee no., name and job of employees whose employee no. 7876, 7839, 7788, 7566. 13.Display employee no. and name whose name start alphabet ‘S’. 14.Display employee no, name and salary of employees whose name ‘s second character is ‘a’. 15.Display employee no, name and salary of employees whose name ‘s second last character is ‘n’. 16.Display employee no, name and salary of employees whose name ‘s last character is ‘a’. 17.Display employee no, name and salary of employees whose name ‘s contain ‘i’. 18.Display employee no., name except 7788, 7839, 7900. 19.Display all the employee no and name whose commission is not NULL. 20.Display employee no and name whose salary is not in between 15000 and 20000. 21.Display employee no., name and annual salary of all employee. Annual salary will be calculated as salary into 12. Use column alias. 22.Write a query to update all the records with an increment of RS. 500 whose salary is less than 15000.