working on sample database
DESCRIPTION
Simple codes for the predefined database for DB2TRANSCRIPT
![Page 1: Working on Sample Database](https://reader036.vdocuments.net/reader036/viewer/2022081506/563dbb0e550346aa9aa9e161/html5/thumbnails/1.jpg)
1. Connect to sample database
Connect to sample
2. To list all tables
LIST TABLES
3. Describe the structure of a table EMPLOYEE
DESCRIBE TABLE employee
4. List all rows for table EMPLOYEE
SELECT * FROM employee
5. List selected columns for EMPLOYEE
6. Create alias name for column.
![Page 2: Working on Sample Database](https://reader036.vdocuments.net/reader036/viewer/2022081506/563dbb0e550346aa9aa9e161/html5/thumbnails/2.jpg)
7. Concatenate columns
8. List all rows with salary between 20,000 and 50,000 arranged in descending order.
![Page 3: Working on Sample Database](https://reader036.vdocuments.net/reader036/viewer/2022081506/563dbb0e550346aa9aa9e161/html5/thumbnails/3.jpg)
9. List rows with salary greater than 50,000
10. List all rows hired between 1980 and 2000 in ascending order in terms of hiredate.
![Page 4: Working on Sample Database](https://reader036.vdocuments.net/reader036/viewer/2022081506/563dbb0e550346aa9aa9e161/html5/thumbnails/4.jpg)
11. Sort Employee by last name. List empno, concatenated lastname and firstnme , and its dept
12. Sort Employee by workdept then by lastname.
![Page 5: Working on Sample Database](https://reader036.vdocuments.net/reader036/viewer/2022081506/563dbb0e550346aa9aa9e161/html5/thumbnails/5.jpg)
13. List all employees with workdept equal to a00 OR workdept = E11
14. List all employees that belong to workdept C01, E01, E21.
![Page 6: Working on Sample Database](https://reader036.vdocuments.net/reader036/viewer/2022081506/563dbb0e550346aa9aa9e161/html5/thumbnails/6.jpg)
15. List employee’s last name, salary and projected 10% increase in salary.