Answer: The NOT NULL Constraint
Explore how to apply the NOT NULL constraint in SQL to enforce mandatory data entry in table columns. Understand using ALTER TABLE to modify columns, adding default values, and alternative methods for imposing NOT NULL constraints to maintain data integrity.
We'll cover the following...
We'll cover the following...
Solution
The solution is given below:
Explanation
The explanation of the solution code is given below:
Lines 2–3: The
ALTER TABLEmake changes to an already existingEmployeestable. TheMODIFY COLUMNmodifies the columnEmpNamecolumn to beNOT NULL.Lines 6–7: The
ALTER TABLEmake changes to an already existingEmployeestable. TheMODIFY COLUMNmodifies the columnSalarycolumn to beNOT NULL.Line 10:
DESCelaborates the ...