CET_TARDE - MTA Database - E_COMANDS

Description

Database Quizzes preparing to certification
Hawerth Castro
Quiz by Hawerth Castro, updated more than 1 year ago
Hawerth Castro
Created by Hawerth Castro almost 7 years ago
95
0

Resource summary

Question 1

Question
You have the following table:
Answer
  • foreign key
  • clustered index
  • nonclustered index
  • foreign key
  • clustered index
  • nonclustered index

Question 2

Question
You have 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?
Answer
  • Non-null constraint
  • Default constraint
  • Index
  • Foreign key

Question 3

Question
This question requires that you evaluate the underlined text to determine if it is correct. The CREATE TABLE command removes one or more table definitions and all data, indexes, triggers, constraints, and permission specifications for those tables. Instructions: Review the underlined text. If it makes the statement correct, select “No change is needed.” If the statement is incorrect, select the answer choice that makes the statement correct:
Answer
  • No change is needed
  • DROP TABLE
  • TRUNCATE TABLE
  • ALTER TABLE

Question 4

Question
You have a table named Employee that includes four columns. You execute the following statement: SELECT * FROM Employee Which columns are returned?
Answer
  • all columns
  • only the last column
  • only the first column
  • only the first and last columns

Question 5

Question
Which keyword must be included in a create view statement?
Answer
  • WHERE
  • ORDER BY
  • UPDATE
  • SELECT

Question 6

Question
The Product table contains the following data. You execute the following statement: SELECT COUNT(*) FROM Product WHERE Quantity > 18 What is the value returned by this statement?
Answer
  • 1
  • 2
  • 3
  • 4

Question 7

Question
You have a table that contains information about all students in your school. Which SQL keyword should you use to change a student’s first name in the table?
Answer
  • UPDATE
  • CHANGE
  • SELECT
  • INSERT

Question 8

Question
Which keyword would you use in a select statement to return rows that meet a specific condition?
Answer
  • WHERE
  • UNION
  • ORDER BY
  • FROM

Question 9

Question
You have the following table definition: CREATE TABLE Product (ID INTEGER PRIMARY KEY, Name VARCHAR(20), Quantity INTEGER) The Product table contains the following data. You execute the following statement: SELECT Name FROM Product WHERE Quantity IS NOT NULL How many rows are returned?
Answer
  • 0
  • 1
  • 2
  • 3
  • 4

Question 10

Question
You execute the following statement: SELECT EmployeeID, FirstName, DepartmentName FROM Employee, Department This type of operation is called a/an:
Answer
  • Intersection
  • Outer join
  • Equi-join
  • Cartesian product

Question 11

Question
You are writing an SQL statement to retrieve rows from a table. Which data manipulation language (DML) command should you use?
Answer
  • READ
  • SELECT
  • OUTPUT
  • GET

Question 12

Question
which command used to removes all rows from a table without logging the individual row deletions.
Answer
  • DROP TABLE
  • TRUNCATE TABLE
  • CREATE TABLE
  • ALTER TABLE

Question 13

Question
You need to delete a database table. Which data definition language (DDL) keyword should you use?
Answer
  • ALTER
  • DELETE
  • DROP
  • TRUNCATE

Question 14

Question
You need to rename a column in a database table. Which data definition language (DDL) statement should you use?
Answer
  • ALTER
  • INSERT
  • CREATE
  • UPDATE

Question 15

Question
What are three valid data manipulation language (DML) commands? (Choose three.)
Answer
  • INSERT
  • COMMIT
  • DELETE
  • OUTPUT
  • UPDATE

Question 16

Question
You are writing an SQL statement to retrieve rows from a table. Which data manipulation language (DML) command should you use?
Answer
  • READ
  • SELECT
  • OUTPUT
  • GET

Question 17

Question
17. You have the following table definition: CREATE TABLE Road (RoadID INTEGER NOT NULL, Distance INTEGER NOT NULL) The Road table contains the following data: You execute the following statement: INSERT INTO Road VALUES (1234, 36) What is the result?
Answer
  • an error stating that NULL values are not allowed
  • a new row in the table
  • an error stating that duplicate IDs are not allowed
  • a syntax error

Question 18

Question
You need to enable a new employee to authenticate to your database. Which command should you use?
Answer
  • ALLOW USER
  • CREATE USER
  • ADD USER
  • INSERT USER
  • ALTER USER

Question 19

Question
This question requires that you evaluate the underlined text to determine if it is correct. Create a query that returns a set of table data by using the UPDATE statement. Instructions: Review the underlined text. If it makes the statement correct, select “No change is needed.” If the statement is incorrect, select the answer choice that makes the statement correct.
Answer
  • No change is needed
  • INSERT
  • REPLACE
  • SELECT

Question 20

Question
You accept an IT internship at a local charity. The charity asks you to keep a record of its volunteers by using a database table named Volunteer. The table has the following columns and rows:
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 21

Question
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?
Answer
  • SET ProduetName = ‘glass’
  • LET ProduetName = ‘glass’
  • EXEC ProduetName = ‘glass’
  • ASSIGN ProduetName = ‘glass’

Question 22

Question
You have a table of products with fields for ProductID, Name, and Price. You need to write an UPDATE statement that sets the value in the InStock field to Yes for a specific ProductID. Which clause should you use in your update statement?
Answer
  • THAT
  • WHERE
  • GROUP BY
  • HAVING

Question 23

Question
You need to list the name and price of each product, sorted by price from highest to lowest. Which statement should you use?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 24

Question
You have a table named Customer. You need to add a new column named District. Which statement should you use?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 25

Question
You need to remove a view named EmployeeView from your database. Which statement should you use?
Answer
  • DELETE VIEW EmployeeView
  • DELETE EmployeeView
  • DROP EmployeeView
  • DROP VIEW EmployeeView

Question 26

Question
On which database structure does an update statement operate?
Answer
  • Table
  • User
  • Trigger
  • Role

Question 27

Question
You need to populate a table named EmployeeCopy with data from an existing table named Employee. Which statement should you use?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 28

Question
You execute the following statement: SELECT DepartamentName FROM Departament WHERE DepartamentID = (SELECT DepartamentID FROM Employee WHERE EmployeeID = 1234 This statement is an example of a/an:
Answer
  • Subquery
  • Union
  • Outer join
  • Cartesian product

Question 29

Question
Which command should you use to add a column to an existing table?
Answer
  • MODIFY
  • ALTER
  • UPDATE
  • INSERT
  • CHANGE

Question 30

Question
Which keyword can be used in a create table statement?
Answer
  • ORDER BY
  • DISTINCT
  • GROUP BY
  • UNIQUE

Question 31

Question
Which statement creates a composite key?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 32

Question
You are creating a database object named Student to store the following data: Which syntax should you use to create the object?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 33

Question
You have a database table named SongInformation as defined below:
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 34

Question
You accept an IT internship at a local charity. The charity asks you to keep a record of its volunteers by using a database table named Volunteer. When volunteers ask to be removed from mailing lists, the table must be updated. You need to use a transaction to ensure that the database has data integrity and referential integrity. Which statement should you use?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 35

Question
You have a database table that contains the following columns: Which two Structured Query Language (SQL) statements can you use? (Choose two.)
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 36

Question
You have the database table named Cars as defined below: How many rows are returned by the SQL statement?
Answer
  • 4
  • 5
  • 6
  • 7

Question 37

Question
Your database contains a table named Customer. You need to delete the record from the Customer table that has a CusromerID of 12345. Which statement should you use?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 38

Question
You have the following table definition: CREATE TABLE Product (ProductID INTEGER, Name VARCHAR(20)) You need to insert a new product. The product’s name is Plate and the product’s ID is 12345. Which statement should you use?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 39

Question
Which statement deletes the rows where the employee’s phone number is not entered?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 40

Question
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?
Answer
  • Option A
  • Option B
  • Option C
  • Option D
  • Option E

Question 41

Question
You have a table named Product that contains the following data. The PrcducrID column is the primary key. The CategoryID column is a foreign key to a separate table named Category. You execute the following statement: INSERT INTO Product VALUES (3296, ‘Table’, 4444) What is the result?
Answer
  • a foreign key constraint violation
  • a syntax error
  • a new row in the Product table
  • a primary key constraint violation
  • a new row in the Category table

Question 42

Question
You have a table named Employee that includes the following columns: EmployeeID Smp1oyeeName Which statement should you use to return the number of rows in the table?
Answer
  • Option A
  • Option B
  • Option C
  • Option D

Question 43

Question
You have a table named Product. The Product table has columns for ProductDescription and ProductCategory. You need to change the ProductCategory value for all the spoons in the Product table to 43. Which statement should you use?
Answer
  • Option A
  • Option B
  • Option C
  • Option D
Show full summary Hide full summary

Similar

CET_TARDE - MTA Database - INDEX
Hawerth Castro
CET_TARDE - MTA Database - DIAGNOSTIC4
Hawerth Castro
CET_TARDE - MTA Database - E_backup_permissions
Hawerth Castro
CET_TARDE - MTA Database - DIAGNOSTIC5
Hawerth Castro
CET_TARDE - MTA Software Development Fundamentals 3
Hawerth Castro
CET_TARDE - MTA Mobility and Devices Fundamentals 1
Hawerth Castro
CET_TARDE - MTA Software Development Fundamentals 4
Hawerth Castro
CET_TARDE - MTA Windows OS Fundamentals 4
Hawerth Castro
CET_TARDE - MTA Windows OS Fundamentals 6
Hawerth Castro
CET_TARDE - MTA Windows OS Fundamentals 3
Hawerth Castro
CET_TARDE - MTA Windows OS Fundamentals 5
Hawerth Castro