CITA 221 Exam 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

To retrieve or update the data in a database, the client sends a ________________ to the database.

query

If you define a column with a default value, that value is used whenever a row

that doesn't include a value for that column is added to the table

Unless you assign a ________________, the column name in the result set is the same as the column name in the base table.

Column alias

To run a SELECT statement from an application program, you store the statement in the ________________ object for the database connection.

Command

Which of the following is not a SQL DML statement?

Create Table

What keyword can you code in the SELECT clause to prevent duplicate rows from being returned by a SELECT statement?

DISTINCT

If you try to move a database file that's attached to a server, you'll get an error message that indicates the file is in use. To get around this, you need to ________________ the database from the server.

Detach

Which ORDER BY clause causes 10 rows to be retrieved from the result set, starting with the 20th row?

ORDER BY InvoiceTotal DESC OFFSET 20 ROWS FETCH NEXT 10 ROWS

What is the most common type of relationship between two tables?

One to many

To override the order of precedence in an arithmetic expression, you can use

Parentheses

One limitation of the Query Designer is that you can't use it for

certain types of complex queries

When you code an ORDER BY clause, you can specify a

column name, alias, expression, or column number

Which of the following can you use to combine data from two or more tables into a single result set?

join

A SQL Server database consists of two files: a database file and

A log file

Management Studio allows you to back up a database. Then, if you accidentally modify or delete data, you can easily ________________ it.

Restore

A relational database consists of one or more what?

Tables

When using the Query Designer, you can sort the sequence for the query in the

Criteria pane

SQL statements that define the tables in a database are referred to as ________________ statements.

Data Definition Language (DDL)

What keyword do you code at the endo of the ORDER BY clause to sort the records that are retrieved by a SELECT statement in descending sequence?

Desc

A database ________________ is a schematic drawing that shows you the relationships between the tables you're working with.

Diagram

When using the Query Designer, you select the tables and columns you want to use in the

Diagram pane

Although the American National Standards Institute publishes the specifications for a standard SQL language, each DBMS vendor has its own ________________ of SQL.

Dialect/variant

Which clause specifies the number of rows that should be skipped before rows are returned from the result set?

OFFSET

When coded in a WHERE clause, which search condition will return invoices when PaymentDate is not null and InvoiceTotal is greater than or equal to $500?

PaymentDate IS NOT NULL AND InvoiceTotal >= 500

What uniquely identifies each row in a table?

Primary key

Within the Management Studio, you can build a SQL statement without having to write your own code by using the

Query Designer

Which of the following is not a valid column alias name?

Total Sales

When you use Windows authentication to connect to a database, SQL Server

uses the login name and password that you use for your PC to authorize your connection

If you want to use the Management Studio to modify the data for a table, you can right

click on the table and select what? - Edit Top 200 Rows command

Which operator do you use to concatenate character strings in a string expression?

+

Which wildcard character do you use in the SELECT clause to return all of the columns from the base table?

*

A string expression can consist of

All of the above

You can create a database diagram for

any combination of the tables in a database

If you have the files for an existing SQL Server database, the easiest way to create the database is to ________________ those files to the database server.

Attach

The search condition of a WHERE clause consists of one or more

Boolean expressions

The intersection of a row and a column is commonly called what?

Cell

Which clause specifies the number of rows that should be retrieved after skipping the specified number of rows?

FETCH

To relate one table to another, a/an ________________ in one table is used to point to the primary key in another table.

Foreign key

Which clause of the SELECT statement names the table that contains the data to be retrieved?

From

Which expression will not compute 10% of the balance due if balance due is the invoice total minus the credit total minus the payment total?

InvoiceTotal - CreditTotal - PaymentTotal / 10

What keyword can you use to retrieve rows in which an expression matches a string pattern called a mask?

LIKE

The three main hardware components of a client/server system are the clients, the server, and the

Network

The order of precedence for the logical operators in a WHERE clause is

Not,And,Or

When you code a SELECT statement, you must code the four main clauses in the following order

SELECT, FROM, WHERE, ORDER BY

When you set the compatibility level of SQL Server 2019, you make sure it is compatible with a specific version of

SQL Server

A graphical tool that you can use to start and stop the database server is called what?

SQL Server Configuration Manager

When using the Query Designer, where is the generated SQL statement displayed?

SQL pane In Management Studio, the Query Editor uses the IntelliSense feature to automatically display ________________ lists that you can use to enter parts of the SQL statement. - Completion

Which of the following types of statements isn't an action query?

Select

If you define a column as an identity column

a number is generated for that column whenever a row is added to the table

Insert, Update, and Delete statements can be referred to as ________________ queries.

action

The processing that's done by the DBMS is typically referred to as

backend processing

To store and manage the databases of the client/server system, each server requires what?

database management system (DBMS)

Which of the following is typically modeled after a real

world entity, such as an invoice or a vendor? -Table

In Management Studio, what tool would you use if you wanted to modify a column or view more detailed information about the columns in a table?

Table Designer

Which of the following recommendations won't improve the readability of your SQL statements?

Use comments to describe what each statement does.

If you want to filter the result set that's returned by a SELECT statement, you must include which clause?

WHERE


Set pelajaran terkait

PF- 4 It Pays to Save, Savings Account, & Special Savings Accounts- 10/24/17(Tue.)- 10/30/17(Mon.)- Q: 1- Saving

View Set

serology, blood, & bodily fluids

View Set

Biology AMP 1 BSC2085 Chapter 1-3 (Quizzes) (PART 2) EXAM1

View Set

Chapter 17. Methods of Persuasion Concept

View Set

Operating-System Structures Ch. 2

View Set