Page |1
WGU C427 OBJECTIVE ASSESSMENT FINAL EXAM NEWEST
2025/2026 NEWEST ACTUAL EXAM WITH COMPLETE
QUESTIONS AND VERIFIED ANSWERS |ALREADY GRADED
A+|
What is the UNIQUE constraint, and how is it applied to single
and multiple columns? - ANSWER-The UNIQUE constraint
ensures that values in a column, or group of columns, are unique.
When applied to a single column, UNIQUE may appear either in
the column declaration or a separate clause. When applied to a
group of columns, UNIQUE is a table constraint and must appear
in a separate clause.
Refer to the Employee table. Identify the UNIQUE constraints.
```sql CREATE TABLE Employee ( ID SMALLINT UNSIGNED,
Name VARCHAR(60), Extension CHAR(4), Username
VARCHAR(50) UNIQUE, UNIQUE (Name, Extension), PRIMARY
KEY (ID) ); ``` - ANSWER-- Column UNIQUE constraint:
`Username VARCHAR(50) UNIQUE` - Table UNIQUE constraint:
`UNIQUE (Name, Extension)`
What is the CHECK constraint, and how is it used? - ANSWER-
The CHECK constraint specifies an expression on one or more
, Page |2
columns of a table. The constraint is violated when the expression
is FALSE and satisfied when the expression is either TRUE or
NULL. CHECK may appear either in the column declaration or a
separate clause.
Refer to the Employee table. Identify the CHECK constraints.
```sql CREATE TABLE Employee ( ID SMALLINT UNSIGNED,
Name VARCHAR(60), BirthDate DATE, HireDate DATE CHECK
(HireDate >= '2000-01-01' AND HireDate <= '2019-12-31'),
CHECK (BirthDate < HireDate), PRIMARY KEY (ID) ); ``` -
ANSWER-- Column CHECK constraint: `HireDate DATE CHECK
(HireDate >= '2000-01-01' AND HireDate <= '2019-12-31')` - Table
CHECK constraint: `CHECK (BirthDate < HireDate)`
How are constraints named, and why is it important? - ANSWER-
Constraints are named using the optional CONSTRAINT keyword
followed by the constraint name and declaration. Naming
constraints is important because constraint names appear in error
messages when constraints are violated.
Refer to the Department table. Identify the named constraints.
```sql CREATE TABLE Department ( Code TINYINT UNSIGNED,
, Page |3
Name VARCHAR(20), ManagerID SMALLINT, CONSTRAINT
DepartmentKey PRIMARY KEY (Code), CONSTRAINT
UniqueNameMgr UNIQUE (Name, ManagerID) ); ``` - ANSWER--
Named primary key constraint: `CONSTRAINT DepartmentKey
PRIMARY KEY (Code)` - Named unique constraint:
`CONSTRAINT UniqueNameMgr UNIQUE (Name, ManagerID)`
How are constraints added and dropped using the ALTER TABLE
statement? - ANSWER-Constraints are added and dropped with
the ALTER TABLE TableName followed by an ADD, DROP, or
CHANGE clause. - Adding constraints: ```sql ALTER TABLE
TableName ADD [CONSTRAINT ConstraintName] PRIMARY
KEY (Column1, Column2 ...); ALTER TABLE TableName ADD
[CONSTRAINT ConstraintName] FOREIGN KEY (Column1,
Column2 ...) REFERENCES TableName(Column); ALTER TABLE
TableName ADD [CONSTRAINT ConstraintName] UNIQUE
(Column1, Column2 ...); ALTER TABLE TableName ADD
[CONSTRAINT ConstraintName] CHECK (expression); ``` -
Dropping constraints: ```sql ALTER TABLE TableName DROP
PRIMARY KEY; ALTER TABLE TableName DROP FOREIGN
KEY ConstraintName; ALTER TABLE TableName DROP INDEX
ConstraintName (drops UNIQUE constraints); ALTER TABLE
TableName DROP CHECK ConstraintName; ALTER TABLE
, Page |4
TableName DROP CONSTRAINT ConstraintName (drops any
named constraint); ```
Refer to the Employee table. Write statements to add a CHECK
constraint named HireCheck and drop a UNIQUE constraint
named UniqueNameHiredate. ```sql CREATE TABLE Employee (
ID SMALLINT UNSIGNED, Name VARCHAR(60), HireDate
DATE, PRIMARY KEY (ID) ); ``` - ANSWER-- Adding a CHECK
constraint: ```sql ALTER TABLE Employee ADD CONSTRAINT
HireCheck CHECK (HireDate >= '2000-01-01'); ``` - Dropping a
UNIQUE constraint: ```sql ALTER TABLE Employee DROP
INDEX UniqueNameHiredate; ```
What is the purpose of the IN operator in SQL? - ANSWER-The
IN operator is used in a WHERE clause to determine if a value
matches one of several values.
Write an SQL query using the IN operator to select rows where
the Language column has Dutch, Kongo, or Albanian values. -
ANSWER-SELECT *
FROM CountryLanguage
WGU C427 OBJECTIVE ASSESSMENT FINAL EXAM NEWEST
2025/2026 NEWEST ACTUAL EXAM WITH COMPLETE
QUESTIONS AND VERIFIED ANSWERS |ALREADY GRADED
A+|
What is the UNIQUE constraint, and how is it applied to single
and multiple columns? - ANSWER-The UNIQUE constraint
ensures that values in a column, or group of columns, are unique.
When applied to a single column, UNIQUE may appear either in
the column declaration or a separate clause. When applied to a
group of columns, UNIQUE is a table constraint and must appear
in a separate clause.
Refer to the Employee table. Identify the UNIQUE constraints.
```sql CREATE TABLE Employee ( ID SMALLINT UNSIGNED,
Name VARCHAR(60), Extension CHAR(4), Username
VARCHAR(50) UNIQUE, UNIQUE (Name, Extension), PRIMARY
KEY (ID) ); ``` - ANSWER-- Column UNIQUE constraint:
`Username VARCHAR(50) UNIQUE` - Table UNIQUE constraint:
`UNIQUE (Name, Extension)`
What is the CHECK constraint, and how is it used? - ANSWER-
The CHECK constraint specifies an expression on one or more
, Page |2
columns of a table. The constraint is violated when the expression
is FALSE and satisfied when the expression is either TRUE or
NULL. CHECK may appear either in the column declaration or a
separate clause.
Refer to the Employee table. Identify the CHECK constraints.
```sql CREATE TABLE Employee ( ID SMALLINT UNSIGNED,
Name VARCHAR(60), BirthDate DATE, HireDate DATE CHECK
(HireDate >= '2000-01-01' AND HireDate <= '2019-12-31'),
CHECK (BirthDate < HireDate), PRIMARY KEY (ID) ); ``` -
ANSWER-- Column CHECK constraint: `HireDate DATE CHECK
(HireDate >= '2000-01-01' AND HireDate <= '2019-12-31')` - Table
CHECK constraint: `CHECK (BirthDate < HireDate)`
How are constraints named, and why is it important? - ANSWER-
Constraints are named using the optional CONSTRAINT keyword
followed by the constraint name and declaration. Naming
constraints is important because constraint names appear in error
messages when constraints are violated.
Refer to the Department table. Identify the named constraints.
```sql CREATE TABLE Department ( Code TINYINT UNSIGNED,
, Page |3
Name VARCHAR(20), ManagerID SMALLINT, CONSTRAINT
DepartmentKey PRIMARY KEY (Code), CONSTRAINT
UniqueNameMgr UNIQUE (Name, ManagerID) ); ``` - ANSWER--
Named primary key constraint: `CONSTRAINT DepartmentKey
PRIMARY KEY (Code)` - Named unique constraint:
`CONSTRAINT UniqueNameMgr UNIQUE (Name, ManagerID)`
How are constraints added and dropped using the ALTER TABLE
statement? - ANSWER-Constraints are added and dropped with
the ALTER TABLE TableName followed by an ADD, DROP, or
CHANGE clause. - Adding constraints: ```sql ALTER TABLE
TableName ADD [CONSTRAINT ConstraintName] PRIMARY
KEY (Column1, Column2 ...); ALTER TABLE TableName ADD
[CONSTRAINT ConstraintName] FOREIGN KEY (Column1,
Column2 ...) REFERENCES TableName(Column); ALTER TABLE
TableName ADD [CONSTRAINT ConstraintName] UNIQUE
(Column1, Column2 ...); ALTER TABLE TableName ADD
[CONSTRAINT ConstraintName] CHECK (expression); ``` -
Dropping constraints: ```sql ALTER TABLE TableName DROP
PRIMARY KEY; ALTER TABLE TableName DROP FOREIGN
KEY ConstraintName; ALTER TABLE TableName DROP INDEX
ConstraintName (drops UNIQUE constraints); ALTER TABLE
TableName DROP CHECK ConstraintName; ALTER TABLE
, Page |4
TableName DROP CONSTRAINT ConstraintName (drops any
named constraint); ```
Refer to the Employee table. Write statements to add a CHECK
constraint named HireCheck and drop a UNIQUE constraint
named UniqueNameHiredate. ```sql CREATE TABLE Employee (
ID SMALLINT UNSIGNED, Name VARCHAR(60), HireDate
DATE, PRIMARY KEY (ID) ); ``` - ANSWER-- Adding a CHECK
constraint: ```sql ALTER TABLE Employee ADD CONSTRAINT
HireCheck CHECK (HireDate >= '2000-01-01'); ``` - Dropping a
UNIQUE constraint: ```sql ALTER TABLE Employee DROP
INDEX UniqueNameHiredate; ```
What is the purpose of the IN operator in SQL? - ANSWER-The
IN operator is used in a WHERE clause to determine if a value
matches one of several values.
Write an SQL query using the IN operator to select rows where
the Language column has Dutch, Kongo, or Albanian values. -
ANSWER-SELECT *
FROM CountryLanguage