CET_TARDE - MTA Database - E_COMANDS

Descrição

Database Quizzes preparing to certification
Hawerth Castro
Quiz por Hawerth Castro, atualizado more than 1 year ago
Hawerth Castro
Criado por Hawerth Castro mais de 7 anos atrás
101
0

Resumo de Recurso

Questão 1

Questão
You have the following table:
Responda
  • foreign key
  • clustered index
  • nonclustered index
  • foreign key
  • clustered index
  • nonclustered index

Questão 2

Questão
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?
Responda
  • Non-null constraint
  • Default constraint
  • Index
  • Foreign key

Questão 3

Questão
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:
Responda
  • No change is needed
  • DROP TABLE
  • TRUNCATE TABLE
  • ALTER TABLE

Questão 4

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

Questão 5

Questão
Which keyword must be included in a create view statement?
Responda
  • WHERE
  • ORDER BY
  • UPDATE
  • SELECT

Questão 6

Questão
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?
Responda
  • 1
  • 2
  • 3
  • 4

Questão 7

Questão
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?
Responda
  • UPDATE
  • CHANGE
  • SELECT
  • INSERT

Questão 8

Questão
Which keyword would you use in a select statement to return rows that meet a specific condition?
Responda
  • WHERE
  • UNION
  • ORDER BY
  • FROM

Questão 9

Questão
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?
Responda
  • 0
  • 1
  • 2
  • 3
  • 4

Questão 10

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

Questão 11

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

Questão 12

Questão
which command used to removes all rows from a table without logging the individual row deletions.
Responda
  • DROP TABLE
  • TRUNCATE TABLE
  • CREATE TABLE
  • ALTER TABLE

Questão 13

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

Questão 14

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

Questão 15

Questão
What are three valid data manipulation language (DML) commands? (Choose three.)
Responda
  • INSERT
  • COMMIT
  • DELETE
  • OUTPUT
  • UPDATE

Questão 16

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

Questão 17

Questão
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?
Responda
  • 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

Questão 18

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

Questão 19

Questão
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.
Responda
  • No change is needed
  • INSERT
  • REPLACE
  • SELECT

Questão 20

Questão
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:
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Questão 21

Questão
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?
Responda
  • SET ProduetName = ‘glass’
  • LET ProduetName = ‘glass’
  • EXEC ProduetName = ‘glass’
  • ASSIGN ProduetName = ‘glass’

Questão 22

Questão
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?
Responda
  • THAT
  • WHERE
  • GROUP BY
  • HAVING

Questão 23

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

Questão 24

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

Questão 25

Questão
You need to remove a view named EmployeeView from your database. Which statement should you use?
Responda
  • DELETE VIEW EmployeeView
  • DELETE EmployeeView
  • DROP EmployeeView
  • DROP VIEW EmployeeView

Questão 26

Questão
On which database structure does an update statement operate?
Responda
  • Table
  • User
  • Trigger
  • Role

Questão 27

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

Questão 28

Questão
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:
Responda
  • Subquery
  • Union
  • Outer join
  • Cartesian product

Questão 29

Questão
Which command should you use to add a column to an existing table?
Responda
  • MODIFY
  • ALTER
  • UPDATE
  • INSERT
  • CHANGE

Questão 30

Questão
Which keyword can be used in a create table statement?
Responda
  • ORDER BY
  • DISTINCT
  • GROUP BY
  • UNIQUE

Questão 31

Questão
Which statement creates a composite key?
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Questão 32

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

Questão 33

Questão
You have a database table named SongInformation as defined below:
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Questão 34

Questão
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?
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Questão 35

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

Questão 36

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

Questão 37

Questão
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?
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Questão 38

Questão
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?
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Questão 39

Questão
Which statement deletes the rows where the employee’s phone number is not entered?
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Questão 40

Questão
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?
Responda
  • Option A
  • Option B
  • Option C
  • Option D
  • Option E

Questão 41

Questão
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?
Responda
  • 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

Questão 42

Questão
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?
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Questão 43

Questão
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?
Responda
  • Option A
  • Option B
  • Option C
  • Option D

Semelhante

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 Windows OS Fundamentals 5
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 3
Hawerth Castro
CET_TARDE - MTA Windows OS Fundamentals 4
Hawerth Castro
CET_TARDE - MTA Windows OS Fundamentals 6
Hawerth Castro