Thursday, May 7, 2015

No homework.

Tuesday, May 5, 2015

Homework 7

Write on a piece of paper the MYSQL commands to execute the following tasks.

1. Create a new table containing these four columns: Emp#, Lastname, Firstname, and JobClass. The table name should be EMPLOYEES. The JobClass column should be able to store character strings up to a maximum length of four,  but the column values shouldn't be packed if the value has less than four characters. The Emp# column contains a numeric ID and should allow a five digit number. Use column sizes you consider suitable for the Firstname and Lastname columns.

2. Add two columns to the EMPLOYEES table. One column , named EmpDate , contains the date of employment for each employee, and its default value should be the system date. The second column, named EndDate, contains employees' date termination.

3. Modify the JobClass columnof the EMPLOYEES table so that it allows storing a maximum width of two characters.

4. Delete the EndDate column from the EMPLOYEES table.

5. Rename the EMPLOYEES table as JL_EMPS.