Part 2: Work with a database Using the myco database in the Drop Box (myco.accdb
ID: 3727180 • Letter: P
Question
Part 2: Work with a database
Using the myco database in the Drop Box
(myco.accdb is for Access users, myco.odb is for Open Office users)
Download it to the Assign subfolder
-Add 2 records to the Employee table
-Add a new field called Job Title to the Employee table
and give each employee a title
-Add a query that lists First Name, Last Name and Salary
of all Salaried employees (Salary > 0)
-Add a report that lists First Name, Last Name and Hire Date of all Employees
sorted by descending Hire Date (the most recent first)
Explanation / Answer
1. Adding 2 records to table
insert into Employee values (7, "EmployeeFirstName", "EmployeeLastName", 2/3/1978, 3/4/1998, "Address" , "City", "State", 01123, 23948, 3423, "$45000");
2. Adding a new Field and assign value to the new filed
alter table Employee add JobTitle CHAR (20);
update Employee set JobTitle="Analyst" where EmployeeId not null;
3. Listing employees names whose salary > 0
select FirstName, LastName, Salary from Employee where Salary>0;
4. Order by HireDate descending
select FirstName, LastName, HireDate from Employee
Order by HireDate desc;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.