Skip to content
Question 17 of 29

Q.Nisha is assigned the task of maintaining the staff data of an organization. She has to store the details of the staff in the SQL table named EMPLOYEES with attributes as EMPNO, NAME, DEPARTMENT, BASICSAL to store Employee's Identification Number, Name, Department and Basic Salary respectively. There can be two or more Employees with the same name in the organization.

(i)
(a) Help Nisha to identify the attribute which should be designated as the PRIMARY KEY. Justify your answer. OR
(b) Help Nisha to identify the constraint which should be applied to the attribute NAME such that the Employees' Names cannot be left empty or NULL while entering the records but can have duplicate values.
(ii)
(a) Write the SQL command to change the size of the attribute BASICSAL in the table EMPLOYEES to allow the maximum value of 99999.99 to be stored in it. OR
(b) Write the SQL command to delete the table EMPLOYEES
Uttar Pradesh UpmspCBSE Class XII Board 2025Subjective· 2mImportance★★★★★
59% · 17/29 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Part (a): EMPNO is the primary key (unique, non-NULL). Part (b): apply NOT NULL to NAME and use ALTER TABLE EMPLOYEES MODIFY BASICSAL DECIMAL(7,2);. Part (b) [alternative for (ii)]: DROP TABLE EMPLOYEES;.

The table EMPLOYEES stores EMPNO, NAME, DEPARTMENT, BASICSAL, and importantly two or more employees may have the same NAME.

Part (a)

Part (i)(a) asks for the PRIMARY KEY. A primary key must be unique for every row and can never be NULL.

  • NAME is explicitly allowed to repeat, so it cannot be a primary key.
  • DEPARTMENT groups many employees; BASICSAL can be equal for several employees. Neither is unique.
  • EMPNO (the employee identification number) is issued distinctly to each employee, so it is unique and non-NULL. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.