empid, empname, address, dept, salary
a) Insert any five records.
b) Create a query to show the employees of “Account” department whose salary is greater than 10000.
Solution:-
a) To create a database and make a salary table.
Step 1:- Start Ms Access app.
Step 2:- Rename the database as “salary”. Click Create to finish naming the database.
Step 3:- To add more fields to a table in Datasheet view, double-click the Add New Field header.
Step 4:- Next, we've added the fields empid, empname, address, dept and salary to the salary table.
Step 5:- Next, select Save table from the menu. The Save As dialog box will appear to let you save the table name “salary”.
Step 6:- Insert suitable 5 records in the table and save table.
b) To create a required query
Step 1:- Select the Create tab. Then click on the Query Design button under the Other group.
Step 2:- Next, highlight the salary table and clicked on the Add button. When you are done selecting the tables, click on the Close button.
Step 3:- Add the fields to the query. You can do this by double-clicking on the field name. In this example, we've added the Product Name and Product Amount.
Step 4:- Then click on the Save button at the top left of the window.
Step 5:- The Save As window should appear. Enter the name “Accountsalary” and click on the OK button.
Step 6:- Click on Total button under Show/Hide Group in Design Tab.
Step 7:- In the Criteria of dept field, type =”account” and in the Criteria of salary field type >”10000”.
Step 8:- That’s all the steps for displaying employees of “Account” department whose salary is greater than 10000.
No comments:
Post a Comment