WGU D427 DATA MANAGEMENT APPLICATIONS
TEST 2025
Create a data type with a positive value
UNSIGNED
Describing a foreign key in the CREATE TABLE statement
FOREIGN KEY (ColumnName)
REFERENCES Tablename(ColumnName),
SQL command to add column in an existing table
ALTER TABLE TableName
ADD COLUMN ColumnName DATATYPE;
SQL syntax to create the view name is Myview consists of X,Y,Z columns of
the Maintable table.
CREATE VIEW Myview AS
SELECT X, Y, Z
FROM Maintable;
SQL code to delete view named Myview
DROP VIEW Myview;
, SQL statement to change the Test table, which makes the ID column a primary
key
ALTER TABLE Test
ADD PRIMARY KEY (ID);
Write a SQL statement that makes a foreign key on the Year column of the
Movie table referencing the Year column in the YearStats table.
ALTER TABLE Movie
ADD FOREIGN KEY (Year)
REFERENCES YearStats(Year);
Create a SQL statement to create an index named idx_year on the Year column
of Movie table
CREATE INDEX idx_year
ON Movie (Year);
SQL Command to insert new record in any table
TEST 2025
Create a data type with a positive value
UNSIGNED
Describing a foreign key in the CREATE TABLE statement
FOREIGN KEY (ColumnName)
REFERENCES Tablename(ColumnName),
SQL command to add column in an existing table
ALTER TABLE TableName
ADD COLUMN ColumnName DATATYPE;
SQL syntax to create the view name is Myview consists of X,Y,Z columns of
the Maintable table.
CREATE VIEW Myview AS
SELECT X, Y, Z
FROM Maintable;
SQL code to delete view named Myview
DROP VIEW Myview;
, SQL statement to change the Test table, which makes the ID column a primary
key
ALTER TABLE Test
ADD PRIMARY KEY (ID);
Write a SQL statement that makes a foreign key on the Year column of the
Movie table referencing the Year column in the YearStats table.
ALTER TABLE Movie
ADD FOREIGN KEY (Year)
REFERENCES YearStats(Year);
Create a SQL statement to create an index named idx_year on the Year column
of Movie table
CREATE INDEX idx_year
ON Movie (Year);
SQL Command to insert new record in any table