Questão 1
Questão
What command do you use to perform a query in SQL?
Questão 2
Questão
What wildcard character retrieves all records with the SELECT command?
Questão 3
Questão
What would you use to combine two parameters in a query in SQL
Questão 4
Questão
What clause would you use with the SELECT command that would pull records based on a range?
Questão 5
Questão
What keyword used with the SELECT statement is used to not output specified records?
Responda
-
OR
-
DISALLOW
-
DISREGARD
-
NOT
Questão 6
Questão
What would you use to combine columns from two different tables?
Questão 7
Questão
Which clause used with the SELECT command will return values that you want to exclude from the normal parameters?
Responda
-
EXCEPT
-
INTERSECT
-
SEARCH
-
EXCLUDE
Questão 8
Questão
What clause is used to combine related data from multiple table sources?
Questão 9
Questão
What statement would you use to add data to a table?
Questão 10
Questão
What statement would you use to change data in a table?
Responda
-
CHANGE
-
MODIFY
-
INSERT
-
UPDATE
Questão 11
Questão
What statement is used to delete one or more rows in a table?
Responda
-
DELETE
-
REMOVE
-
TRUNCATE
-
CHANGE
Questão 12
Questão
What statement is used to delete a table from a database?
Responda
-
DELETE
-
DROP
-
REMOVE
-
TRUNCATE
Questão 13
Questão
How can you prevent the accidental loss of an entire table?
Responda
-
Use the DELETE TRANS command
-
Use the LOOPBACK command.
-
Use the SAFEDELETE command.
-
Use referential integrity.
Questão 14
Questão
What do you perform when you want to recall specific records from a database?
Responda
-
recall
-
virtual extraction
-
reach
-
query
Questão 15
Questão
What command would you use to delete a table while leaving the table structure in place for future use?
Responda
-
DELETE TABLE
-
TRUNCATE TABLE
-
REMOVE TABLE
-
STOP TABLE
Questão 16
Questão
What statement would you use to pull all records in which the State is CA from the Users table?
[blank_start]SELECT *[blank_end]
[blank_start]FROM Users[blank_end]
[blank_start]WHERE State = 'CA'[blank_end]
Responda
-
SELECT *
-
FROM Users
-
WHERE State = 'CA'
Questão 17
Questão
What statement would you use to pull First_Name and Last_Name from the Users table in which Gender is F and State is CA?
[blank_start]SELECT First_Name, Last_Name[blank_end]
[blank_start]FROM Users[blank_end]
[blank_start]WHERE Gender = 'F' AND State = 'CA'[blank_end]
Questão 18
Questão
What statement would you use to list the First_Name and Last_Name from the Users table which Department is not IT?
[blank_start]SELECT First_Name, Last_Name[blank_end]
[blank_start]FROM Users[blank_end]
[blank_start]WHERE NOT Department = 'IT'[blank_end]
Questão 19
Questão
What statement would you use to delete the Equipment table?
[blank_start]DROP TABLE Equipment[blank_end]
Questão 20
Questão
The terms "bitmap," "b-tree," and "hash" refer to which type of database structure?
Responda
-
View
-
Function
-
Index
-
Stored procedure
-
Trigger
Questão 21
Questão
One reason to add an index is to:
Responda
-
Decrease storage space.
-
Increase database security.
-
Improve performance of select statements.
-
Improve performance of insert statements.
Questão 22
Questão
You have the first table that contains the following data.
You break the table into the following two tables.
This process is referred to as:
Responda
-
defragmentation
-
normalization
-
fragmentation
-
denormalization
Questão 23
Questão
You have a table that contains the following data.
Which database term is used to describe the relationship between ProductID and
ProductCategory?
Responda
-
Cohort
-
Relationally dependent
-
Deterministic
-
Functionally dependent
-
Compositional
Questão 24
Questão
Which key uniquely identifies a row in a table?
Responda
-
foreiqn
-
primary
-
local
-
superkey
Questão 25
Questão
Which statement creates a composite key?
Questão 26
Questão
What statement would you use to pull First_Name, Last_Name, and ID_Number from the Users table?
[blank_start]SELECT First_Name, Last_Name, ID_Number[blank_end]
[blank_start]FROM Users[blank_end]
Questão 27
Questão
At 3:00 P.M. (1500 hours), you create a backup of your database. At 4:00 P.M. (1600
hours), you create a table named Customer and import data into the table. At 5:00 P.M.
(1700 hours), your server fails.
You run a script to apply only the 3:00 P.M. backup to your database. What is the result of
the script?
Responda
-
The Customer table no longer exists.
-
The Customer table is unaffected
-
The Customer table exists but has no data.
-
The script fails.
Questão 28
Questão
In which situation do you need to perform a restore on a database?
Responda
-
when data becomes corrupted in the database
-
when you need to roll back a transaction
-
when you encounter an error in your application
-
when data needs to be deleted from the database
Questão 29
Questão
Which command should you use to give a user permission to read the data in a table?
Responda
-
ALLOW SELECT
-
LET READ
-
PERMIT READ
-
GRANT SELECT
Questão 30
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 31
Questão
Which keyword can be used in a create table statement?
Responda
-
ORDER BY
-
DISTINCT
-
GROUP BY
-
UNIQUE
Questão 32
Questão
You need to store product quantities, and you want to minimize the amount of storage
space that is used. Which data type should you use?
Responda
-
INTEGER
-
DOUBLE
-
COUNT
-
FLOAT
Questão 33
Questão
Which statement will result in the creation of an index?
Questão 34
Questão
You have the following table definition:
CREATE TABLE Road
(RoadID INTEGER NOT NULL,
Distance INTEGER NOT NULL)
You execute the following statement:
INSERT INTO Road VALUES (1234, 36)
What is the result?
Questão 35
Questão
You need to store product names that vary from three to 30 characters. You also need to
minimize the amount of storage space that is used.
Which data type should you use?
Responda
-
VARCHAR (3, 30)
-
CHAR (3, 30)
-
VARCHAR (30)
-
CHAR (30)
Questão 36
Questão
One reason to create a stored procedure is to:
Questão 37
Questão
Which permission does a user need in order to run a stored procedure?
Questão 38
Questão
You have a table named Product. You create a view that includes all the products from the
Product table that are in the Furniture category.
You execute a statement on the Product table that deletes all the products in the Furniture
category.
After you execute the statement, the result set of the view is:
Responda
-
Empty
-
Deleted
-
Unchanged
-
Archived
Questão 39
Questão
In SQL, an insert statement is used to add a:
Questão 40
Questão
Which of the following is NOT stored in the sysobjects system table?
Responda
-
Functions
-
Triggers
-
Constraints
-
Indexes
Questão 41
Questão
[blank_start]ADD[blank_end] is a reserved keyword in SQL SERVER 2008 and therefore cannot be used as an object name or as a column name in a table, unless delimited.
Responda
-
ADD
-
none of the above
-
SUBTRACT
-
MINUS
Questão 42
Questão
Which of the following range conditions would generate a syntax error?
Responda
-
salary <= 50000 AND salary >= 10000
-
salary between (10000 AND 50000) AND (60000 and 90000)
-
salary >=10000 AND salary <= 50000
-
salary BETWEEN 10000 AND 50000
Questão 43
Questão
Which statement is false?
Responda
-
A table provides structure to store data.
-
A table can be created in a graphical interface and using syntax.
-
A database cannot parse out redundant data.
-
A database retrieves data from different tables and views.
Questão 44
Questão
What is collation?
Responda
-
It is data design and organizations process applied to data structures, based on rules that help building relational databases.
-
It is a concept in SQL Server by which we can add other SQL Server to a group and query both the SQL Servers dbs using T-SQL statements.
-
It means that the data in the db is organized so that all the data elements relating to the same real-world event or object are linked together.
-
It refers to a set of rules that determine how data is sorted and compared
Questão 45
Questão
Which of the following conditions will you use in a WHERE clause to select all last names that start with J?
Responda
-
WHERE LastName = 'J*'
-
WHERE LastName LIKE 'J%'
-
WHERE LastName = 'J%'
-
WHERE LastName LIKE 'J'
Questão 46
Questão
What is the best data type to store the birthdays of the greatest scientists, starting with Leonardo Da Vinci's birthday of April 15, 1452?
Responda
-
INT
-
VARCHAR
-
DATETIME
-
SMALLDATETIME
Questão 47
Questão
If you need to calculate a percentage value, what data type is the best option?
Responda
-
Float
-
Integer
-
SmallInt
-
BigInt
Questão 48
Questão
You have a column that will only contain from 0 to 1024. What is the most economical data type to use for the column?
Responda
-
SMALLINT
-
DECIMAL(3)
-
TINYINT
-
INT
Questão 49
Questão
What is the statement used to suppress the '(1 row(s) affected.' after executing query statements?
Responda
-
SET NO COUNTING
-
SET NO COUNT
-
SET NO COUNTING ON
-
SET NOCOUNT ON
Questão 50
Questão
Which of the following is not supported by the ALTER TABLE command?
Responda
-
Modifying the data type of an existing column.
-
Adding a new column to a table.
-
Changing the IDENTITY constraint of an existing column
-
Deleting multiple columns from an existing table.
Questão 51
Questão
If the data is May 1st 2011 at 09:23AM. What will be the result of the following SELECT statement?
SELECT GETDATE() + 3
Questão 52
Questão
What will be the output of the following statement?
SELECT CHARINDEX('GM',"The best TTS solutions are provided by GMetrix', -1)
Questão 53
Questão
What will be the result of the following statement?
SELECT CAST (-1 AS SMALLDATETIME)
Questão 54
Questão
What will be the result of the following statement?
SELECT REPLACE ('The best TTS solutions is provided by GMetrix', 's', 'z')
Responda
-
None of the above
-
The beszt TTSz szolutionsz isz provided by GMetrix
-
A SQL Server Orthographic error
-
The bezt TTz zolutionz iz provided by GMetrix
Questão 55
Questão
What command would you use to display all records from the clients table that have the state of New Mexico and the city of Roswell?
Responda
-
SELECT * FROM clients WHERE state = "New Mexico" AND City = "Roswell"
-
SELECT * FROM clients WHERE state = New Mexico AND City = Roswell
-
SELECT * FROM clients WHERE state = 'New Mexico' OR City = 'Roswell'
-
SELECT * FROM clients WHERE state = 'New Mexico' AND City = 'Roswell'
Questão 56
Questão
What will be the results of the following statement?
CREATE VIEW cambridge_data AS SELECT NoControl, FullName FROM cambridge ORDER BY FullName
Responda
-
A SQL Sever Database Error because the clause ORDER BY is not valid in the creation of a view.
-
A SQL Sever Database Error because the CREATE VIEW statement is not within a BEGIN/END block.
-
A SQL Sever Database Error because the same column cannot be used multiple times in the statement.
-
The creation of a view called cambridge_date with the data ordered by the field FullName.
Questão 57
Questão
What is the right way to get an accurate count of the number of records in a table?
Questão 58
Questão
What is a subquery?
Responda
-
A query that displays only the rows that match in two joined tables.
-
A particular case when one table joins itself with one or more aliases to avoid confusion.
-
A join that displays only the rows even if they do not have related rows in the joined table.
-
A select statement that is nested within another T-SQL statement.
Questão 59
Questão
SELECT STR(938.56, 6, 1)
Responda
-
938.56
-
938.5
-
0938.5
-
938.6
Questão 60
Questão
What are the entities that can be viewed in the SQL Server Utility?
Responda
-
Instances of SQL Server, Data-Tier apps, Database Files, Volumes
-
Disks, Volumes, Users
-
Instances of SQL Server, Users, Store Procedures, Volumes
-
Instances of SQL Server, Store Procedures, Tables
Questão 61
Questão
Which of the following could not be used as a primary key?
Questão 62
Questão
Which of the following can be used to improve query performance?
Responda
-
All of the above
-
UNIQUE index
-
PRIMARY KEY
-
CLUSTERED index
Questão 63
Questão
Which of the following statements is not true about a FOREIGN KEY?
Responda
-
A table can contain only one FOREIGN key.
-
You can create a foreign key by defining a FOREIGN KEY constraint when you create or alter a table.
-
A FOREIGN KEY enforces referential integrity by ensuring only valid data is stored.
-
A foreign key is a combination of one or more columns used to establish and enforce a link between the data in two tables.
Questão 64
Questão
Which of the following is NOT true about the PRIMARY KEY constraint?
Responda
-
It is always created as CLUSTERED.
-
It is a column that participates in the PRIMARY KEY constraint cannot accept NULL values.
-
It can be composed of more than 1 column.
-
It enforces data uniqueness by creating a unique index for the primary key columns.
Questão 65
Questão
What is the DBCC command used for checking that tables in the db and the indexes are correctly linked?
Responda
-
CHECKLINK
-
CHECKDB
-
CHECKFILEGROUP
-
CHECKALLOC
Questão 66
Questão
Which of the following is NOT a fixed server role?
Responda
-
Accessadmin
-
Diskadmin
-
Setupadmin
-
Securityadmin
Questão 67
Questão
The Cambridge db is acesses by several users in LA, regularly during business hours. You need to ensure that personnel cannot login on to db outside of normal business hours, which is defined as 8:00am to 5:00m, Monday through Saturday, what should you do?
Responda
-
Create a logon trigger to prevent logons after normal business hours.
-
Write a store procedure to respond to all logon events and prevent logons after hours.
-
Create a SQL Server Agent job to shut down the server after 6:00pm and restart before 7:00am.
-
Broadcast a notification indicating the business hours.
Questão 68
Questão
The Cambridge db is using full recovery model. You perform full backups once a week on Friday nights and differential backups every day. If the Cambridge db fails on Friday morning, what should you do first?
Responda
-
Restore the full backup
-
Restore the transaction log
-
Backup the transaction log
-
Restore the most recent differential backup
Questão 69
Questão
[blank_start]Backup[blank_end] is the best method to prevent the loss of data.
Responda
-
Backup
-
Redundant NIC's
-
UPS
-
RAID
Questão 70
Questão
We have the following table:
Name varchar(50)
Lastname varchar(50)
Email varchar(50)
Phone varchar(15)
If we need to store 100,000 records, the estimate size of the table will be:
Responda
-
157.3563 MB
-
1.573563 GB
-
15.73563 MB
-
1.573563 MB
Questão 71
Questão
How many files does Microsoft SQL Server use to store the database?
Questão 72
Questão
What is the sub-language that allows user to insert, delete, and update data in a database?
Questão 73
Questão
Which of these sentences is incorrect?
Responda
-
SELECT * FROM cambridge WHERE id IN (1,3,5)
-
SELECT * FROM cambridge WHERE id NOT IN (1,5)
-
SELECT * FROM cambridge WHEREid BETWEEN (1,5)
-
SELECT * FROM cambridge WHERE id <> (15)
Questão 74
Questão
The DROP command allows you to [blank_start]permanently delete a database/table.[blank_end]
Responda
-
permanently delete a database/table.
-
create new objects like a database/table
-
delete a record from a table.
-
modify the definition of an object.
Questão 75
Questão
Which three are T-SQL commands to handle privileges? (Choose three.)
Responda
-
REFUSE
-
DENY
-
PERMIT
-
GRANT
-
RECIND
-
REVOKE
Questão 76
Questão
[blank_start]DROP LOGIN[blank_end] removes a SQL Server login account.
Responda
-
DROP LOGIN
-
DELETE LOGIN
-
DELETE USER
-
DROP USER
Questão 77
Questão
What does SQL stand for?
Questão 78
Questão
What are three types of databases?
Responda
-
Context Model, Associative Model, Entity-Attribute-Value (EAV) data model
-
Oracle, DB2, SQL Server
-
Network Model, Relational Model, Object Oriented Model
-
Relational, Flat File, Hierarchical
Questão 79
Questão
What is the maximum date value that can be stored in a SMALLDATETIME data type?
Responda
-
June 6, 2079
-
December 31, 9999
-
July 6, 2079
-
December 31, 2079
Questão 80
Responda
-
A virtual table created by a query joining one or more tables
-
A command to recover the content of a table.
-
A physical copy of a table
-
The result of the execution of a query
Questão 81
Questão
Which option is not a T-SQL command to handle privileges?
Questão 82
Questão
What is a trigger?
Responda
-
A named group of SQL statements that have been previously created and stored in the server database.
-
A physical structure containing pointers to the data.
-
A subset of a table.
-
A SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs.
Questão 83
Questão
The WHERE clause allows you to [blank_start]obtain a subset of rows.[blank_end]
Questão 84
Questão
Consider a query of two tables. The results contains only the rows that have a match in both tables. What kind of JOIN was used?
Responda
-
RIGHT OUTER JOIN
-
INNER JOIN
-
LEFT OUTER JOIN
-
FULL OUTER JOIN
Questão 85
Questão
What statement is used to retrieve data from a database?
Questão 86
Questão
The result of the query:
SELECT COUNT (*) from employees
will be:
Responda
-
All of the above.
-
All the records that contains the character *.
-
All the records of the table employees.
-
The number of rows in the table employees.
Questão 87
Questão
What is the result of the following query:
SELECT MAX (salary) from employee
Responda
-
The average salary of all employees.
-
The salary of the employee with the highest value in the identifier column.
-
The maximum salary of all employees.
-
The salary of the employee called Max.
Questão 88
Questão
What statement is used to remove a record from a table?
Responda
-
REMOVE
-
TRUNCATE
-
DELETE
-
ERASE
Questão 89
Questão
What does the following statment do?
SELECT DATEADD(DD, 0, DATEDIFF(DD, 0, GETDATE()))
Responda
-
The statement will generate an error. The second parameter of the DATEDIFF function should be a DATETIME data type.
-
Return the current system date unchanged.
-
Return the integer value of the current system date.
-
Return just the date part of the current system date removing the time.
Questão 90
Questão
How many levels of normal forms are there?
Questão 91
Questão
What determines a database in the third normal form?
Responda
-
The table faithfully represents a relation and has not repeating groups.
-
Every non-prime attribute ins non-transitively dependent on every candidate key in the table.
-
Every non-trivial join dependency in the table is implied by the superkeys of the table.
-
No non-prime attribute in the table is functionally dependent on a proper subset of a candidate key.
Questão 92
Questão
A unique constraint allows you to specify _________________.
Responda
-
each record in a database table.
-
the types of data a user can insert into the database.
-
that data is entered into a cell.
-
which column should not contain duplicate values.
Questão 93
Questão
An index allows you to ______________________.
Responda
-
increase the performance of a query.
-
order the columns in a table.
-
write better queries.
-
define the maximum size of a table.
Questão 94
Questão
SQL code injection is _________________________.
Responda
-
an insert statement.
-
a technique that exploits security vulnerabilities in the db layer of an application.
-
the execution of a store procedure.
-
the use of SQL statements in high level languages.
Questão 95
Questão
[blank_start]Dbcreator[blank_end] can create, alter, and resize databases.
Responda
-
Dbcreator
-
Diskadmin
-
Bulkadmin
-
Setupadmin
Questão 96
Questão
Members of what fixed database role cannot add, modify or delete any data in the tables within a database, regardless of other roles?
Responda
-
db_datareader
-
db_denydatawriter
-
db_backupoperator
-
db_ddladmin
Questão 97
Questão
Which of the following fixed server roles can shut down the SQL Server?
Responda
-
serveradmin
-
processadmin
-
securityadmin
-
setupadmin
Questão 98
Questão
What are the three different methods for which a user can be identified in Server Level security?
Responda
-
None of the above.
-
Windows user login, SQL Server login, Use of Credentials
-
Root, SA, SQL Server login
-
Windows user login, membership in a windows group, SQL Server login
Questão 99
Questão
[blank_start]Full backup[blank_end] preserves data by creating multiple copies that are based on the differences in the data. A successive copy of the data contains only that portion which has changed sine the preceding copy has been created.
Responda
-
Full backup
-
Differential backup
-
Daily backup
-
Incremental backup
Questão 100
Questão
Which of the following, is the filename extension of Microsoft SQL Server transaction log?
Questão 101
Questão
What type of data structure improves data recovery speed?
Responda
-
tri
-
filter
-
Index
-
Transaction Log
Questão 102
Questão
Which of the following is a collection of programs that enable you to capture, organize, and select data from a database?
Responda
-
disk program
-
group spreadsheets
-
application DAT
-
DBMS
Questão 103
Questão
Which of the following defines a simple database using two-dimensional tables consisting of rows and columns?
Responda
-
flat-type database
-
hierarchical database
-
Relational Database
-
table as a database
Questão 104
Questão
Which of the following refers to a database with multiple tables with parent / child relationships and a child can have more than one parent?
Responda
-
flat file database
-
hierarchical database
-
Relational Database
-
table as database
Questão 105
Questão
Which allows multiple users to access both a SQL database?
Questão 106
Questão
Among the following, which sets limits or rules placed on a file or a column to ensure that the data is considered valid for a database?
Responda
-
checker
-
validator
-
scanner
-
constraint
Questão 107
Questão
Among the following, which is the main tool used to configure the databases to Microsoft SQL Server?
Responda
-
DBS
-
SSMS
-
SQL Configuration Tool
-
ODBC SQL emulator
Questão 108
Questão
Which 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?
Questão 109
Questão
Which of the following statements is a T-SQL subset responsible for creating database objects such as tables and stored procedures?
Questão 110
Questão
Which statement type uses USE, CREATE, ALTER, and DROP?
Questão 111
Questão
Which of the following refers to the statement allowing you to delete the table in a SQL database?
Questão 112
Questão
Which of the following refers to the statement that you can use to remove rows from a table?
Responda
-
SELECT
-
UPDATE
-
DELETE
-
STOP
Questão 113
Questão
Which of the following statements is the primary method to program and manage SQL Server?
Responda
-
DOS Commands
-
SQLCMD Scripts
-
XQuery
-
T-SQL
Questão 114
Questão
Which of the following allows you to execute SQL commands in an application from the command line?
Responda
-
DOS Commands
-
SQLCMD Scripts
-
XQuery
-
Transact-SQK
Questão 115
Questão
[blank_start]Database[blank_end] is an organized collection of data, usually stored electronically.
Questão 116
Questão
The main data files used on a Microsoft SQL server have an extension [blank_start].mdf[blank_end]
Questão 117
Questão
Which statement is used to add or remove columns in a table?
[blank_start]ALTER[blank_end]
Questão 118
Questão
What command can you use to change the context of the database?
[blank_start]USE[blank_end]