Chapter 2&3 SQL test

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

To search for null values, use the _________________ clause.

IS NULL

What is the exact operator symbol(s) for representing the "Not equal to" function?

<>

To concatenate character strings, you use the ___________________ function in a string expression.

CONCAT

To sort the rows that are retrieved by a SELECT statement in descending sequence by invoice_total, you code this ORDER BY clause:

DESC

The ________________ clause of the SELECT statement specifies the table that contains the data.

FROM

Which of the following is not a common error when entering and executing SQL statements?

Forgetting to connect to a database

The ________ and _________operators can be used to retrieve rows that match a string pattern.

LIKE and REGEXP

Which of the following would return a maximum of 7 rows, starting with the 4th row?

LIMIT 7, 4

The MySQL Reference Manual can be found at the _______________ web site.

MySQL

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

If you want to filter the rows that are returned by a SELECT statement, you must include a/an ___________________ clause.

WHERE

Which of the following WHERE clauses will return vendor names from A to C?

WHERE vendor_name <'D'

Which of the following is not true when you're using MySQL Workbench to test a script that contains more than one SQL statement?

You cannot run all of the statements in the script at once

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

alias

To return all of the columns from the base table, you can code the ________________ operator in the SELECT clause.

asterisk

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

column name, alias, expression, or column number

___________________________ is a command-line tool that you can use for running SQL statements.

command-line

Before you can use MySQL Workbench to work with a SQL database, you need to open a _____________________ to the database.

connection

In a SQL Editor tab of MySQL Workbench, you can do all but one of the following. Which one is it?

create a database diagram

When you have access to a table through MySQL Workbench, you can view both the column definitions for the table and the ______________________ in the table.

data

To prevent duplicate rows from being returned by a SELECT statement, you can code the __________________ keyword in the SELECT clause.

distinct

The database server can also be referred to as the database _______________________.

engine

You can use the SQL Editor tab to enter and ______________________ one or more SQL statements.

execute

When coded in a WHERE clause, which of the following search conditions will not return a result set that includes all invoices with an invoice_total value of $1000 or less?

invoice_total IN (0, 1000)

Which of the following expressions does not compute 10% of the balance due if balance due is the invoice total minus the credit total minus the payment total?

invoice_total- credit_total-payment_total /10

To retrieve rows in which an expression matches a string pattern called a mask, you can use the ______________ keyword followed by the mask.

like

Each database includes tables, views, and routines. These are called database ____________________.

objects

You can use the IN phrase to test whether an expression is ____________a value in a list.

out of order to

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

parentheses

When coded in a WHERE clause, which search condition will return invoices when payment_date isn't null and invoice_total is greater than or equal to $500?

payment_date is NOT NULL and invoice_total >= 500

To save your own code in MySQL Workbench so that you do not have to type it each time, use the Add New ___________________ button.

snippet

In MySQL Workbench, you can start or stop the MySQL database server by clicking the _______________________ button in the Admin tab.

start server

A SQL script is a file that contains one or more ___________________.

statements

When you run a SQL statement that contains a coding error, MySQL Workbench displays an error message that does not include

the likely cause of the error

Which of the following isn't a valid column alias?

total sales

When coded in a WHERE clause, which of the following would not return rows for vendors in the cities of San Diego and Santa Ana?

vendor_city REGEXP 'NA$'


Set pelajaran terkait

Disability Income and Related Insurance

View Set

Database Design : Chapter 9, 10, 11

View Set

N20025: E3: Drugs to Decrease Histamine Effects & Allergic Response

View Set

Chapter 3 Methods and Encapsulation

View Set

Chapter 9 : The Master Budget and Responsible Accounting

View Set

Introduction to U.S. National Politics: Chapter 15 Quiz

View Set

Organizational Behavior, Organizational Behavior: Chapter 9, Organizational Behavior Exam 2, Organizational Behavior, Organizational Behavior - Chapter 8, Organizational Behavior Exam 2, Organizational Behavior, Organizational Behavior - Chapter 13

View Set

Wellness study guideWhich of the following is not an intervention strategy?

View Set

Chapter 12, "Inference on Categorical Data,"

View Set