Quiz
+1
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (35)
1The ItemsOnOrder table contains the following data.
You need to create a query that display the total number of orders, the average line item total, the highest line item
total, and the grand total of all items ordered. LineItemTotal represents the line item total.
Which query should you use?
- ASELECT COUNT (ID), AVG(LineItemTotal), MAX(LineItemTotal),
SUM(LineItemTotal)
FROM ItemsOnOrder
HAVING ItemNumber, Quantity, UnitPrice - BSELECT COUNT (ID), AVG(Unitprice+Quantity), MAX(UnitPrice+Quantity),
SUM(UnitPrice+Quantity)
FROM ItemOnOrder
GROUP By ItemNumber, LineItemTotal - CSELECT SUM(ID), AVG(LineItemTotal), MAX(LineItemTotal), SUM(LineItemTotal)
FROM ItemOnOrder - DSELECT COUNT(ID), AVG(LineItemTotal), MAX(LineItemTotal), SUM(LineItemTotal)
FROM ItemOnOrder
- ASELECT COUNT (ID), AVG(LineItemTotal), MAX(LineItemTotal),
2You create the following query to determine whether Sample Movie appears only once in the Movie table.
SELECT Title
FROM Movie
WHERE Title = ‘Sample Movie’
ORDER BY Title
GROUP BY Title
HAVING COUNT(*) = 1
When you run this Query, if return a syntax error
You need to modify the query to run without error and return accurate result
What should you do?- ARemove the group by clause
- BChange the having clause to having count(title) = 1
- CRemove the order by clause
- DChange the having clause to having count(1) = 1
3What would you use to combine columns from two different tables?
- AAND
- BBETWEEN
- CJOIN
- DCOMBINE
4You’re the database admin for a university that stores student information in a table named student. This table has
a foreign key named courseID that links to the primary key in a table named courses.
You need to return the student name and course name using both tables where there is a match on courseID.
You execute the following query:
SELECT students.name, courses.name FROM students
OUTER JOIN courses WHERE student.courseID = courses.courseID
The query returns an error.
How should you correct the query?- ASELECT students.name, courses.name FROM students
INNER JOIN courses WHERE students.courseID = courses.courseID - BSELECT students.name, courses.name FROM students
INNER JOIN courses ON students.courseID = courses.coursesID - CSELECT students.name,courses.name FROM students
INNER JOIN ON students.courseID = courses.coursesID - DSELECT students.name, courses.name FROM students
INNER JOIN On courses
WHERE students.courseID = courses.courseID
- ASELECT students.name, courses.name FROM students
5You have two tables named Cars and Color as defined below. The two tables are related by ColorId.
How many rows does the SQL statement return?
- A0
- B2
- C3
- D6
6You have a Customer table and an Order table. You join the Customer table with the Order table by using the
CusromerID column.
The results include:
All customers and their orders
Customers who have no orders
Which type of join do these results represent?- AComplete join
- BPartial join
- CInner join
- DOuter join / Full join
7Which clause used with the SELECT command will return values that you want to exclude from another query's
result set?- AEXCEPT
- BINTERSECT
- CSEARCH
- DEXCLUDE
8You execute the following statement:
SELECT DepartmentName FROM Department
WHERE DepartmentID =
(SELECT DepartmentID
FROM Employee
WHERE EmployeeID = 1234)
This statement is an example of a/an:- ASubquery
- BUnion
- COuter join
- DCartesian product
9You have a table that contains the following data
This process is referred to as:
- Adefragmentation
- Bnormalization
- Cfragmentation
- Ddenormalization
10You need to normalized a database to first normal form.
Which two requirement must you meet? (Choose 2)- AExclude repeating groups
- BExclude foreign key
- CExclude composite key
- DExclude duplicate rows
11You work at a restaurant and they ask you to help them with a data issue.
They provide you with the following recipe data:
You need to normalize the data to third normal form.
How many tables should you create?
- A1
- B2
- C3
- D4
12You create the following table, which displays winners of past pet shows.
Pet Competition Winners
Which column prevents the table from being in third normal form?
- APetID
- BBirthdate
- CID
- DYear
13Denormalization is performed in order to:
- AReduce redundancy.
- BEliminate repeating groups
- CCreate smaller tables.
- DImprove query performance.
14This question requires that you evaluate the underlined text to determine if it is correct.
You combine data from three tables into one table. The new table includes redundancy to optimize read
performance.The data in the new table has been denormalized.
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.- ANo change is needed
- BNormalized
- CTruncated
- DIndexed
15This question requires that you evaluate the underlined text to determine if it is correct.
Use the ALTER statement to add a new table in a database.
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.- ANo change is needed
- BUPDATE
- CINSERT
- DCREATE
16You are developing SQL statement to create a table.
Which two SQL keywords are valid to use in a create table statement? (Choose 2)- AOrder By
- BPrimary Key
- CInsert Into
- DConstraint
17Which keyword can be used in a create table statement?
- AORDER BY
- BDISTINCT
- CGROUP BY
- DUNIQUE
18Which command should you use to add a column to an existing table?
- AMODIFY
- BALTER
- CUPDATE
- DINSERT
- ECHANGE
19You need to rename a column in a database table. Which DDL statement should you use?
- AALTER
- BINSERT
- CCREATE
- DUPDATE
20Which statement should you use to remove a foreign key?
- AALTER TABLE
- BDELETE TABLE
- CDELETE FOREIGN KEY
- DALTER FOREIGN KEY
21A developer adds a BirthDate column with NOT NULL but gets an error:
ALTER TABLE Person ADD BirthDate date NOT NULL;
What caused it, and how can it be fixed? Select the correct SQL statement.- AALTER TABLE Person
ADD BirthDate varchar(10) NOT NULL; - BALTER TABLE Person
ADD BirthDate date DEFAULT '1900-01-01' NOT NULL; - CALTER TABLE Person
ADD BirthDate int NOT NULL; - DALTER TABLE Person
ADD BirthDate date NULL;
- AALTER TABLE Person
22Your company stores customer social security numbers in a column named SSN in a table
named customer. New compliance laws prohibit your companyfrom storing this information.
Running the query below causes an error to occur.
ALTER TABLE Customers
REMOVE SSN;
What changes are needed to the query above so that it removes the SSN column from the customers table ?- AALTER TABLE Customers DELETE SSN;
- BALTER TABLE Customers DELETE COLUMN SSN;
- CALTER TABLE Customers DROP SSN;
- DALTER TABLE Customers DROP COLUMN SSN;
23This 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- ANo change is needed
- BDROP TABLE
- CTRUNCATE TABLE
- DALTER TABLE
24What statement would you use to delete the Equipment table?
- ADELETE TABLE Equipment
- BDROP TABLE Equipment
- CREMOVE TABLE Equipment
- DTRUNCATE TABLE Equipment
25This question requires that you evaluate the underlined text to determine if it is correct.
DELETE TABLE removes all rows from a table without logging the individual row deletions.
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.- ANo change is needed
- BDROP TABLE
- CTRUNCATE TABLE
- DREMOVE TABLE
- ECLEAR TABLE
26Which of the following is the language element allowing you to use statements, such as INSERT, UPDATE and
DELETE to manipulate the data in any SQL Server table?- ADML
- BDDE
- CDDL
- DDAT
27What are three valid data manipulation language (DML) commands? (Choose three.)
- AINSERT
- BCOMMIT
- CDELETE
- DOUTPUT
- EUPDATE
28In SQL, an insert statement is used to add a:
- AUser to a database
- BRow of data to a table.
- CTable to a database
- DColumn to a table definition.
29On which database structure does an insert statement operate?
- ARole
- BTrigger
- CUser
- DStored procedure
- ETable
30You need to add rows to a database table.
Which Structured Query Language (SQL) keyword should you use?- AJOIN
- BINSERT
- CCREATE
- DUPDATE
31You have the following table definition:
What is the result?
- Aan error stating that NULL values are not allowed
- Ba new row in the table
- Can error stating that duplicate IDs are not allowed
- Da syntax error
32You 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?- AINSERT INTO Product
VALUES (ProductID= 12345, Name = 'Plate') - BINSERT NEW ProductID = 12345, Name = 'Plate'
INTO Product - CINSERT 12345, 'Plate'
INTO Product - DINSERT INTO Product (ProductID, Name)
VALUES (12345, 'Plate')
- AINSERT INTO Product
33You 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?- AINSERT INTO Product
VALUES (ID= 125, 126) (Name ='Book', 'Movie') - BINSERT INTO Product (ID, Name)
VALUES (125, 'Book')
INSERT INTO Product (ID, Name)
VALUES (126, 'Movie') - CINSERT 125, 126, 'Book', 'Movie'
INTO - DINSERT NEW ID = 125 AND 126, Name = 'Book' AND 'Movie'
INTO P - ENSERT NEW ID = 125, Name = = 'Book'
INTO Product
INSERT NEW ID = 126, Name = 'Movie'
INTO Pro
- AINSERT INTO Product
34You need to populate a table named EmployeeCopy with data from an existing table named Employee.
Which statement should you use?- ASELECT * INTO EmployeeCopy
SELECT * FROM Employee - BINSERT *
FROM Employee
INTO EmployeeCopy - CCOPY INTO Employee
SELECT *
FROM Employee - DINSERT INTO EmployeeCopy
SELECT * FROM Employee
- ASELECT * INTO EmployeeCopy
35On which database structure does an update statement operate?
- ATable
- BUser
- CTrigger
- DRole
Informações
- Descrição
- Quiz sobre +1, criado por Lilian Sw em 27-04-2026.
- Autor
- Lilian Sw
- Idioma
- English
- Visualizações
- 68
- Avaliação
- 5,0 de 5 · 1 avaliação Avalie este quiz