TEST 2

Ace your homework & exams now with Quizwiz!

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%'

Which syntax should you use to create the object

CREATE TABLE Campers ( ID INT Name VARCHAR(25) Cabin INT)

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.

UPS is the best method to prevent the loss of data.

Backup

If the database fails on Saturday morning, what should you do first? How many differential backups must you restore?

Backup the transaction log 1

A clustered index improves the performance of which types of queries?

Queries that return large result sets

which of the following range conditions would generate a syntax error?

Salary between (10000 AND 50000) AND (60000 and 90000)

SELECT CHARINDEX('GM','The best TTS solutions are provided by GMetrix', -1)

40

What will be the result of the following statement? select str(938.56, 6, 1)

938.6

Which is a major difference between a stored procedure and a function?

Function must be compiled every time it is called

You need to insert a new product

INSERT INTO Cookies (Name, CookieID) VALUES ('Snickerdoodle', 77)

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

Float is the best data type to calculate a percentage value

No change is needed

SELECT GETDATE() + 3

05/04/2011 09:23 am

Which of the following could not be used as a primary key?

A table containing only one FOREIGN key

Minus 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.

ADD

What is the right way to get an accurate count of the number of records in table1

All of the above

REMOVE erases data from a table

DELETE

Which Transact-SQL command removes a table from the database

DROP TABLE

Which three are fixed server roles?

Diskadmin, Setupadmin, Securityadmin

A user needs the ALLOW permission to run a stored procedure

EXECUTE

Which of the following is NOT stored in the sysobjects system table

Indexes

What are the entities that can be viewed in the SQL Server Utility

Instances of SQL Server, Data-Tier apps, Database Files, Volumes

What is collation

It refers to a set of rules that determine how data is sorted and compared

you need to create a query that will display

SELECT * FROM clients WHERE state - 'New MExico' AND city = 'Rosewell'

What is the statement to use to suppress the '(1 row(s) affected.' after executing query statements

SET NOCOUNT ON

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

Which Transact-SQL command removes all rows from a table without logging the individual row deletions?

TRUNCATE TABLE

SELECT REPLACE('The best TTS solutions is provided by GMetrix','s','z')

The Bezt TTz Zolutionz is provided by GMetrix

SELECT CAST(-1 AS SMALLDATETIME)

The system will generate an error

When should you use an UPDATE statement

To modify a set of existing table rows

Primary key constraint

Yes, no, yes, yes

Which three are true statements about Foreign Keys? (Choose 3)

a combination, defining a foreign key, enforces referential integrity

What is a subquery?

a select statement

Which of the following can be used to improve query performance?

all of the above

A table provides structure to store data--YES A databse retrieves data from different tables and views--YES A database cannot parse out redundant data-- NO A table can be created in a graphical interface or by using syntax--YES

nah ni99a

ALTER TABLE COMMANDS yes, yes, yes, no

nah ni99a

D8CC CHECKDB- Ensures that tables in the database and the indexes are correctly linked. DBCC CHECKALLOC- Checks that all pages in a database are correctly allocated. DBCC CHECKFILEGROUP- Checks the all tables file group for any damage. DBCC CHECKLINK- is not a supported command

nah ni99a

The first normal form requires that the database exclude which one of the following?

repeating groups

the username that failed to logon was ___ what is the reason the logon failed?

test user 1 Too early


Related study sets

Government 2305: Chapter 5 Smartbook

View Set

AP Chemistry: Unit 3 College Board Questions

View Set

Chapter 11: Environmental Safety

View Set

Morphology Chapter 3.6, Minor Processes

View Set