Advertisements
Advertisements
प्रश्न
Consider the following table EMPLOYEE, which stores EmployeeID, Name, Department and Salary.
Table: EMPLOYEE
| EmployeeID | Name | Department | Salary |
| 101 | Aman | IT | 60000 |
| 102 | Rahul | HR | 50000 |
| 103 | Priya | IT | 70000 |
| 104 | Neha | Finance | 55000 |
| 105 | Rahul | IT | 60000 |
- Which attribute in the Table can be considered as the Primary Key? Provide justification for your answer.
- Write a suitable SQL query to add a new column, Experience, of numeric data type to the table.
- Write the output of the following SQL Query.
SELECT Department, COUNT(*) FROM Employee GROUP BY Department;
अति संक्षिप्त उत्तर
Advertisements
उत्तर
- EmployeeID can be considered as Primary Key because it uniquely identifies each employee in the table.
- ALTER TABLE Employee ADD Experience INT;
Department COUNT(*) IT 3 HR 1 Finance 1
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
