Home
Subjects
Textbook solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
Science
Computer Science
Databases
Database Quiz 2
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (36)
Which of the following is NOT stored in the sysobjects system table?
Indexes
Which of the following range conditions would generate a syntax error?
salary between (10000 AND 50000) AND (60000 and 90000)
What is collation?
It refers to a set of rules that determines how data is sorted and compared.
Which of the following conditions will you use in a WHERE clause to select all last names that start with J?
WHERE LastName LIKE 'J%'
**to search for strings in a column, the LIKE operator is used together with the % wildcard character
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?
INT
You have a column that will only contain values from 0 to 1024. What is the most economical data type to use for the column?
SMALLINT
What is the statement to use to suppress the '(1 row (s) affected.' after executing query statements?
SET NOCOUNT ON
If the data is May 1st 2011 at 09:23AM, What will be the result of the following SELECT statement?
SELECT GETDATE() + 3
05/04/2011 09:23 AM
What will be the output of the following statement?
SELECT CHARINDEX('GM','The best TTS solutions are provided by GMetrix', -1)
40
What will be the result of the following statement?
SELECT CAST(-1 AS SMALLDATETIME)
The system will generate an error. Only positive integer values can be converted to a SMALLDATETIME data type.
What will be the result of the following statement?
SELECT REPLACE('The best TTS solution is provided by GMetrix', 's', 'z')
The bezt TTZ zolutionz iz provided by GMetrix
What will be the result of the following statement?
CREATE VIEW cambridge_data AS SELECT NoControl, FullName FROM cambridge ORDER by FullName
A SQL Server Database Error because the ORDER BY clause is not valid in the creation of a view.
What is the right way to get an accurate count of the number of records in table1?
All of the above:
-SELECT rows FROM sysindexes where name like 'IX_table1'
-SELECT COUNT(*) FROM table1
-SELECT * FROM table1
What is a subquery?
A select statement that is nested within another T-SQL statement.
What will be the result of the following statement?
SELECT STR(938.56, 6, 1)
938.6
What are the entities that can be viewed in the SQL Server Utility?
Instances of SQL Server, Data-Tier apps, Database Files, Volumes
Which of the following could not be used as a primary key?
A table containing only one FOREIGN key
Which of the following can be used to improve query performance?
All of the above"
-PRIMARY KEY
-CLUSTERED index
-UNIQUE index
A table provides structure to store data
True
A database retrieves data from different tables and views
True
A database cannot parse out redundant data
False
A table can be created in graphical interface or by using syntax
True
Database Consistency Check (DBCC) command:
CHECKALLOC
Function:
Checks that all pages in a database are correctly allocated
Database Consistency Check (DBCC) command:
CHECKDB
Function:
Ensures that tables in the database and the indexes are correctly linked
Database Consistency Check (DBCC) command:
CHECKFILEGROUP
Function:
Checks tables for any damage
A Primary Key constraint can be composed of more than 1 column
True
A Primary Key constraint is always created as CLUSTERED
False
A Primary Key constraint enforces data uniqueness by creating a unique index for the primary key columns
True
A Primary Key constraint is a column that participates in the PRIMARY KEY constraint cannot accept NULL values
True
Which three are true statements about Foreign Keys? (choose three)
--A Foreign Key is a combination of one or more columns used to establish and enforced a link between the data in two tables
--You can create 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 clustered index improves the performance of which types of queries?
Queries that return large result sets
Which three are fixe server roles? (choose three)
--Diskadmin
--Setupadmin
--Securityadmin
"UPS" is the best method to prevent the loss of data
Incorrect-- should be "Backup"
You volunteer at a private campground. You are creating a database object named Campers to store the following data:
IDName: Cabin:
1 Chipmunks 10
2 Squirrels 11
3 Bears 12
Which syntax should you use to create the object?
SQL Query:
CREATE TABLE Campers (
ID INT
Name VARCHAR(25)
Cabin INT )
You need to create a query that will display all records from the clients table that have the state New Mexico and the city of Roswell.
SQL Query:
SELCT *
FROM clients
WHERE state = 'New Mexico' AND city = 'Roswell'
You have the following table definition:
CREATE TABLE Cookies
(CookieID INTEGER,
Name VARCHAR(20))
You need to insert a new product. The cookie name is Snickerdoodle and the cookie ID is 77. Which SQL should you use?
SQL Query:
INSERT INTO Cookies (Name, CookieID)
VALUES ( 'Snickerdoodle', 77)
Other sets by this creator
Mock ex 3w
73 terms
mock ex 2
77 terms
ITIL 4 5.11
32 terms
ITIL 4 4.10
82 terms
Verified questions
COMPUTER SCIENCE
What will the following program display? $$ \begin{matrix} \text{def main():}\\ \text{x = 1}\\ \text{y = 3.4}\\ \text{print(x, y)}\\ \text{change\_us(x, y)}\\ \text{print(x, y)}\\ \text{def change\_us(a, b):}\\ \text{a = 0}\\ \text{b = 0}\\ \text{print(a, b)}\\ \text{main()}\\ \end{matrix} $$
COMPUTER SCIENCE
What are the three major activities of an operating system with regard to memory management?
COMPUTER SCIENCE
Which of the following is not a part of the IPO pattern? a) Input b) Program c) Process d) Output
COMPUTER SCIENCE
What are the tradeoffs involved in rereading code pages from the file system versus using swap space to store them?
Other Quizlet sets
Chủ đề 11
24 terms
Direito Penal - Fato típico e Ilicitude
26 terms
Sociology Education Revision
30 terms
Quiz 2: Post Quiz Review
10 terms