Anda di halaman 1dari 11

mtaPOST TEST

You have a table named Product that contains one million rows. You need to search for
product information in the Product by using the products unique ID. What will make this type
of search more efficient?
An Index
A Trigger
A Subquery
A Cursor
You need to insert two new products into the product table. The first product is named book
and has an ID of 125. the second product is named Movie and has an ID of 126. Which
statement should you use?
INSERT 125, 126, Book, Movie INTO Product
INSERT NEW ID = 125 AND 126, Name = Book AND Movie INTO Product
INSERT INTO Product VALUES (ID = 125, 126) (Name = Book, Movie)
INSERT INTO Product (ID, Name)VALUES (125, Book) INSERT INTO Product (ID,
Name)VALUES (126, Movie)
Which two elements are required to define a column?
a key and a name
a name and a data type
an index and a name
a data type and a key
You are developing SQL statement to create a table. Which two SQL keywords are valid to
use in a CREATE TABLE statement?
primary key and constraint
ordered by and constraint
insert into and primary key
ordered by and insert into
You have a table of products with fields for ProductID, and Price. You need to write an
UPDATE statement that sets the value in the IntStock field to Yes for a specific ProductID.
Which clause should you use in your UPDATE statement?
GROUP BY
HAVING
THAT
WHERE
Which keyword would you use in a SELECT statement to return rows in spesific condition?
WHERE
UNION
FROM
ORDER BY
What is one difference between an UPDATE statement and a DELETE statement
An UPDATE statement does not remove rows from a table
A DELETE statement cannot use a WHERE clause

An UPDATE statement can change only one row


A DELETE statement works only within a stored procedure
You have a table named Customer. You need to add a new column named District. Which
statement should you use?
MODIFY TABLE Customer (District INTEGER)
ALTER TABLE Customer ADD (District INTEGER)
MODIFY TABLE Customer ADD (District INTEGER)
ALTER TABLE Customer MODIFY (District INTEGER)
What command would you use to grant object permissions?
GRANT
USE
RUNAS
ALLOW
Which statements will result in the creation of an index?
CREATE TABLE Employee (EmployeeID INTEGER INDEX)
CREATE TABLE Employee (EmployeeID INTEGER PRIMARY KEY)
CREATE TABLE Employee (EmployeeID INTEGER NULL)
CREATE TABLE Employee (EmployeeID INTEGER DISTINCT)
Which two elements are required to define a column?
A data type and name
An Index and key
A name and key
A data type and index
From the following SQL Query : SELECT* FROM dbo.ProAthlete WHERE Salary >
500000 The query takes too much time to return data. You need to improve the performance
of the query. Which item should you add to the Salary column?
index
default constraint
non-null constraint
database
One difference between a function and a stored procedure is that a function :
Must return a value
Cannot accept parameters
Cannot contain a transaction
Must be called from a trigger
Which type of index changes the order in which the data is stored in a table?
Clustered
Non-Clustered
Non-sequential
Sequential
To develop a database to store data about textbooks.

stored procedure
function
view
table
Which statement should use to remove a foreign key?
ALTER TABLE
DELETE TABLE
ALTER FOREIGN KEY
DELETE FOREIGN KEY
You execute a statement inside a transaction to delete 100 rows from a table. The transaction
falls after 40 rows are deleted. What is the result in the database?
The table will be corrupted
The Transaction will restart
No rows will be deleted from the table
Forty (40) rows will be deleted from the table
Instructions : which statements is true ?
A non - clustered index stores all table data order
A clustered index stores all table data in an unsorted order
A clustered index and a non-clustered index can be used simultaneously on the same
table
You have the following table definition : CREATE TABLE Products (ProductID INTEGER,
Name VARCHAR(20)} You need to insert a new product. The products name is Plate and
the Products ID is 12345. Which statement should you use?
INSERT 12345, Plate INTO Products
INSERT NEW ProductID = 12345, Name = Plate INTO Products
INSERT INTO Products (ProductID,Name) VALUES (12345,Plate)
INSERT INTO Products VALUES (ProductID = 12345, Name = Plate)
You are writing a SELECT statement to find every product whose name contains a specific
character. Which keyword should you use in your WHERE clause?
LIKE
FIND
BETWEEN
INCLUDES
Which permission does user need in order to run store procedure?
ALLOW
CALL
EXECUTE
RUN
On which database structure does on INSERT statement operate?
Role
Stored Procedure

Table

Trigger
User
Which command should you use to remove a table from a database?
REMOVE TABLE
UPDATE TABLE
DROP TABLE
DELETE TABLE
From the statement bellow, which statement is false?
A SQL Server Login can use Windows Authentication
A SQL Server Role provides permissions at the server level
A SQL Server Login is garanted permission to database views only
First normal form requires that a database exclude :
Composite Keys
Duplicate Rows
Foreign Keys
Repeating Groups
You have a table that contains Product IDs and Product names. You need to write an
UPDATE statement to change the name of a specific product to glass. What should you
include in the UPDATE statement?
LET ProductName = glass
SET ProductName = glass
EXEC ProductName = glass
ASSIGN ProductName = glass
Denormalization is performed in order to :
Reduce redundancy
Create smaller table
Eliminate repeating groups
Improve query performance
Your database contains a table names Customer. You need to delete the record from the
Customer table that has a CustomerID of 12345 which statement should you use?
UPDATE Customer DELETE * WHERE CustomerID = 12345
UPDATE CustomerID From Customer DELETE * WHERE CustomerID = 12345
DELETE FROM Customer WHERE CustomerID = 12345
DELETE CustomerID FROM Customer WHERE CustomerID = 12345
Which statement creates composite key?
CREATE TABLE Order (OrderID INTEGER, OrderItemID INTEGER PRIMARY
KEY(OrdeID, OrderItemID)
CREATE TABLE Order (OrderID INTEGER PRIMAY KEY, OrderItemID INTEGER
PRIMAY KEY)
CREATE TABLE Order (OrderIDINTEGER, OrderItemID INTEGER, PRIMARY KEY)
CREATE TABLE Order (OrderID INTEGER, OrderItemID INTEGER, PRIMARY KEY
OrderID, PRIMARY KEY OrderItemID)

On which database structure does an UPDATE statement operate?


trigger
user
role
table
On which database structure does an UPDATE statement operate?
trigger
user
role
table

UP TEST

On which database structure does on INSERT statement operate?


Role
Stored Procedure
Table
Trigger
User
What are three valid data manipulation language (DML) commands?
DELETE, INSERT and UPDATE
OUTPUT, COMMIT and DELETE
UPDATE, INSERT and OUTPUT
INSERT, COMMIT and OUTPUT
Which two elements are required to define a column?
A data type and name
An Index and key
A name and key
A data type and index
Your database contains a table names Customer. You need to delete the record from the
Customer table that has a CustomerID of 12345 which statement should you use?
UPDATE Customer DELETE * WHERE CustomerID = 12345
UPDATE CustomerID From Customer DELETE * WHERE CustomerID = 12345
DELETE FROM Customer WHERE CustomerID = 12345
DELETE CustomerID FROM Customer WHERE CustomerID = 12345
Which Command should you give a user permission to read the data in table?
Allow Select
Grant Select
Let Read
Permit Read
You have a table named Product that contains one million rows. You need to search for
product information in the Product by using the products unique ID. What will make this type
of search more efficient?
An Index
A Trigger
A Subquery
A Cursor
You have a table named Customer. You need to add a new column named District. Which
statement should you use?
MODIFY TABLE Customer (District INTEGER)
ALTER TABLE Customer ADD (District INTEGER)
MODIFY TABLE Customer ADD (District INTEGER)
ALTER TABLE Customer MODIFY (District INTEGER)

Which constraint ensures a unique value in the ID column for each customer?
DISTINCT
FOREIGN KEY
PRIMARY KEY
SEQUNTIAL
You are creating a table to store customer data. The AccountNumber column uses values that
always consist of one letter and four digits. What data type that used?
BYTE
CHAR
DOUBLE
SMALLINT
You need to disable User1s access to view the data in the Customer table, which statement
should you use?
REMOVE User1 FROM Customer
REVOKE User1 FROM Customer
REMOVE SELECT ON Customer FROM User1
REVOKE SELECT ON Customer FROM User1
You have the following table definition : CREATE TABLE Products (ProductID INTEGER,
Name VARCHAR(20)} You need to insert a new product. The products name is Plate and
the Products ID is 12345. Which statement should you use?
INSERT 12345, Plate INTO Products
INSERT NEW ProductID = 12345, Name = Plate INTO Products
INSERT INTO Products (ProductID,Name) VALUES (12345,Plate)
INSERT INTO Products VALUES (ProductID = 12345, Name = Plate)
Which permission does user need in order to run store procedure?
ALLOW
CALL
EXECUTE
RUN
Denormalization is performed in order to :
Reduce redundancy
Create smaller table
Eliminate repeating groups
Improve query performance

You need to insert two new products into the product table. The first product is named book
and has an ID of 125. the second product is named Movie and has an ID of 126. Which
statement should you use?
INSERT 125, 126, Book, Movie INTO Product
INSERT NEW ID = 125 AND 126, Name = Book AND Movie INTO Product
INSERT INTO Product VALUES (ID = 125, 126) (Name = Book, Movie)
INSERT INTO Product (ID, Name)VALUES (125, Book) INSERT INTO Product (ID,
Name)VALUES (126, Movie)
You have a table of products with fields for ProductID, and Price. You need to write an
UPDATE statement that sets the value in the IntStock field to Yes for a specific ProductID.
Which clause should you use in your UPDATE statement?
GROUP BY
HAVING
THAT
WHERE
Which command should you use to add a column to an existing table?
ALTER
INSERT
MODIFY
UPDATE
You execute the following statement : SELECT EmployeeID, Firstname, DepartmenName,
FROM Employee, Department This type of operation is called a/an :
Cartesian product
Equi-join
Intersection
Outer Join
One difference between a function and a stored procedure is that a function :
Must return a value
Cannot accept parameters
Cannot contain a transaction
Must be called from a trigger
In Which situation do you need to perform a restore on database?
When you need to roll back a transaction
When data become corrupted in the database
When you encounter an error in your application
When data needs to be deleted from the database

You need to store the contact information for each student in your school database.You
should store each students information in a :
Function
Row
Stored procedure
Variable
Which statement deletes the row where the employers phone number is not entered?
DELETE FROM Employee WHERE Phone IS NULL
DELETE FROM Employee WHERE Phone = NULLABLE
DELETE FROM Employee WHERE Phone = $
DELETE FROM Employee WHERE Phone IS NOT NULL
Which statement should use to remove a foreign key?
ALTER TABLE
DELETE TABLE
ALTER FOREIGN KEY
DELETE FOREIGN KEY
What is one different between an UPDATE statement and a DELETE Statement?
An UPDATE Statement does not remove rows from table
An UPDATE Statement can change only one row
A DELETE Statement can not use WHERE Clause
A DELETE Statement works only a stored procedure
First normal form requires that a database exclude :
Composite Keys
Duplicate Rows
Foreign Keys
Repeating Groups
Which type of index changes the order in which the data is stored in a table?
Clustered
Non-Clustered
Non-sequential
Sequential
Which keyword can be used in a CREATE TABLE statement?
UNIQUE
DISTINCT
GROUP BY
ORDER BY

You have a Department table and Employee table in your database.You need to ensure that an
employee can be assigned to only an existing department. What you should you apply to the
Employee table?
A data type
A Foreign Key
An Index
A Primary Key
A Unique constraint
You execute a statement inside a transaction to delete 100 rows from a table. The transaction
falls after 40 rows are deleted. What is the result in the database?
The table will be corrupted
The Transaction will restart
No rows will be deleted from the table
Forty (40) rows will be deleted from the table
You need to store the first name, last name, and student ID for 100 students.This information
will be store in table as :
Three items and 100 cells
Three rows and 100 columns
100 item and three cells
100 rows and three columns
Which keyword must be included in a CREATE VIEW Statement?
ORDER BY
SELECT
UPDATE
WHERE
What command would you use to grant object permissions?
GRANT
USE
RUNAS
ALLOW
You have a table that contains Product IDs and Product names. You need to write an
UPDATE statement to change the name of a specific product to glass. What should you
include in the UPDATE statement?
LET ProductName = glass
SET ProductName = glass
EXEC ProductName = glass
ASSIGN ProductName = glass

You are writing a SELECT statement to find every product whose name contains a specific
character. Which keyword should you use in your WHERE clause?
LIKE
FIND
BETWEEN
INCLUDES
Which statement creates composite key?
CREATE TABLE Order (OrderID INTEGER, OrderItemID INTEGER PRIMARY
KEY(OrdeID, OrderItemID)
CREATE TABLE Order (OrderID INTEGER PRIMAY KEY, OrderItemID INTEGER
PRIMAY KEY)
CREATE TABLE Order (OrderIDINTEGER, OrderItemID INTEGER, PRIMARY KEY)
CREATE TABLE Order (OrderID INTEGER, OrderItemID INTEGER, PRIMARY KEY
OrderID, PRIMARY KEY OrderItemID)
What defines the amount of storage space that is allocated to a value in a column?
Data type
Format
Key
Validator

Anda mungkin juga menyukai