Deck 6: Introduction to SQL

Full screen (f)
exit full mode
Question
What does the following SQL statement do?
Alter Table Customer_T
Add (Type Varchar (2));

A) Alters the Customer_T table to accept Type 2 Varchars
B) Alters the Customer_T table to be a Type 2 Varchar
C) Alters the Customer_T table, and adds a field called "Type"
D) Alters the Customer_T table by adding a 2-byte field called "Varchar"
Use Space or
up arrow
down arrow
to flip the card.
Question
What does the following SQL statement do?
Select * From Customer Where Cust_Type = "Best"

A) Selects all the fields from the Customer table for each row with a customer labeled "best"
B) Selects the "*" field from the Customer table for each row with a customer labeled "best"
C) Selects fields with a "*" in them from the Customer table
D) Selects all the fields from the Customer table for each row with a customer labeled "*"
Question
________ is a set of commands used to update and query a database.

A) DML
B) DDL
C) DCL
D) DPL
Question
The command for creating a database is:

A) create table.
B) create view.
C) create schema.
D) create authorization.
Question
Which of the following is a technique for optimizing the internal performance of the relational data model?

A) Avoiding indexes on secondary keys
B) Clustering data
C) Not reporting statistics to save machine resources
D) Using random index organizations
Question
________ is a set of commands used to control a database,which includes security.

A) DML
B) DDL
C) DCL
D) DPL
Question
The benefits of a standardized relational language include:

A) application longevity.
B) reduced training costs.
C) cross-system communication.
D) all of the above.
Question
Which of the following questions is answered by the SQL statement?
Select Count (Product_Description)from Product_T;

A) How many products are in the Product Table?
B) How many products have product descriptions in the Product Table?
C) How many characters are in the field name "Product_Description"?
D) How many different columns named "product Description" are there in table Product_T?
Question
The SQL command ________ adds one or more new columns to a table.

A) create table
B) alter table
C) create view
D) create relationship
Question
The SQL command ________ defines a logical table from one or more tables or views.

A) create table
B) alter table
C) create view
D) create relationship
Question
What does the following SQL statement do?
Update Product_T
Set Unit_Price = 775
Where Product_ID = 7

A) Changes the price of a unit called Product_T to 7
B) Changes the unit price of Product 7 to 775
C) Changes the length of the Unit_Price field to 775
D) Updates the Product_T table to have a unit price of 775
Question
The ________ is the structure that contains descriptions of objects such as tables and views created by users.

A) SQL
B) schema
C) catalog
D) master view
Question
What does the following SQL statement do?
Delete from Customer_T
Where state = 'HI';

A) Deletes all records from customer_t where the state is equal to HI
B) Removes the customer_t table from the database
C) Deletes all records from the customer_t table
D) None of the above
Question
The first in a series of steps to follow when creating a table is to:

A) identify columns that must be unique.
B) identify each attribute and its characteristics.
C) create an index.
D) identify columns that must be null.
Question
Any create command may be reversed by using a ________ command.

A) truncate
B) drop
C) delete
D) unpack
Question
Indexes are created in most RDBMSs to:

A) provide a quicker way to store data.
B) decrease the amount of disk space utilized.
C) provide rapid random and sequential access to base-table data.
D) increase the cost of implementation.
Question
Which of the following is a purpose of the SQL standard?

A) To specify syntax and semantics of SQL data definition and manipulation
B) To specify minimal and complete standards, which permit different degrees of adoption in products
C) To define the data structures and basic operations for SQL databases
D) All of the above
Question
DDL is typically used during which phases of the development process?

A) Implementation
B) Physical design
C) Analysis
D) All of the above
Question
What result will the following SQL statement produce?
Select Avg(standard_price)as average from product_v;

A) The average of all products in product_v
B) The average standard_price of all products in product_v
C) The average price of all products
D) None of the above
Question
In an SQL statement,which of the following parts states the conditions for row selection?

A) Select
B) From
C) Where
D) Group By
Question
What results will be produced by the following SQL query?
Select sum(standard_price)as total_price
From product_v
Where product_type = 'WOOD';

A) The total price of all products that are of type wood
B) The total price of all products
C) The standard_price of the first wood product in the table
D) The standard_price of any wood product in the table
Question
What will be returned when the following SQL query is executed?
Select driver_no,count(*)as num_deliveries
From deliveries
Group by driver_no
Having count(*)> 2;

A) A listing of all drivers who made more than 2 deliveries as well as a count of the number of deliveries
B) A listing of all drivers
C) A listing of the number of deliveries greater than 2
D) A listing of all drivers who made more than 2 deliveries
Question
Which of the following is the wildcard operator in SQL statements?

A) < >
B) *
C) =
D) &
Question
To eliminate duplicate rows in a query,the ________ qualifier is used in the SQL Select command.

A) alter
B) distinct
C) check
D) specific
Question
What will be returned when the following SQL statement is executed?
Select driver_no,count(*)as num_deliveries
From deliveries
Group by driver_no;

A) A listing of all drivers, sorted by driver number
B) A listing of each driver as well as the number of deliveries that he or she has made
C) A count of all of the deliveries made by all drivers
D) None of the above
Question
To get all the customers from Hawaii sorted together,which of the following would be used?

A) Order By
B) Group By
C) Having
D) Sort
Question
What will result from the following SQL Select statement?
Select min(product_description)
From product_v;

A) The minimum value of product_description will be displayed.
B) An error message will be generated.
C) The first product description alphabetically in product_v will be shown.
D) None of the above.
Question
A single value returned from an SQL query that includes an aggregate function is called a(n):

A) agate.
B) scalar aggregate.
C) vector aggregate.
D) summation.
Question
Which of the following finds all groups meeting stated conditions?

A) Select
B) Where
C) Having
D) Find
Question
Which of the following counts ONLY rows that contain a value?

A) Count
B) Count(*)
C) Tally(*)
D) Checknum
Question
Which of the following can produce scalar and vector aggregates?

A) Order By
B) Group By
C) Having
D) Sort
Question
What will be returned when the following SQL statement is executed?
Select driver_no,count(*)as num_deliveries
From deliveries
Where state = 'MA'
Group by driver_no;

A) A listing of all drivers who made deliveries to state = 'MA', sorted by driver number
B) A listing of each driver who made deliveries to state = 'MA' as well as the number of deliveries that each driver has made to that state
C) A count of all of the deliveries made to state = 'MA' by all drivers.
D) None of the above.
Question
A ________ view is materialized when referenced.

A) virtual
B) dynamic
C) materialized
D) base
Question
What result set will the following query return?
Select item_no
From order_v
Where quantity > 10;

A) The item_no of all orders that had more than 10 items
B) The order_id of all orders that had more than one item
C) The order_id of all orders that had more than 10 items
D) The item_no of all orders that had 10 or more items
Question
Which of the following will produce the minimum of all standard prices?

A) Select standard_price from product_v where standard_price = min;
B) Select min(standard_price) from product_v;
C) Select standard_price from min(product_v);
D) Select min(standard_price) from product_v where standard_price = min(standard_price);
Question
What result set will the following query return?
Select item_no,description
From item
Where weight > 100 and weight < 200;

A) The item_no and description for all items weighing less than 100
B) The item_no for all items weighing between 101 and 199
C) The item_no and description for all items weighing between 101 and 199
D) The item_no for all items weighing more than 200
Question
Multiple values returned from an SQL query that includes an aggregate function are called:

A) vector aggregates.
B) scalar aggregates.
C) agates.
D) summations.
Question
What result set is returned from the following query?
Select customer_name,telephone
From customers
Where city in ('Boston','New York','Denver');

A) The customer_name and telephone of all customers
B) The customer_name and telephone of all customers living in either Boston, New York or Denver
C) The customer_name and telephone of all customers living in Boston and New York and Denver
D) The customer_name of all customers living in Boston, New York or Denver
Question
A view may not be updated directly if it contains:

A) the distinct keyword.
B) derived columns and expressions in the select clause.
C) uses the group by or having clause.
D) all of the above.
Question
Which of the following is true of the order in which SQL statements are evaluated?

A) The select clause is always processed first.
B) The select clause is always processed last.
C) The select clause is processed before the order by clause.
D) The group by clause is processed before the where clause.
Question
A major benefit of SQL as a standard is reduced training costs.
Question
When creating tables,it's important to decide which columns will allow null values before the table is created.
Question
One of the original purposes of the SQL standard was to provide a vehicle for portability of database definition and application modules between conforming DBMSs.
Question
The DELETE TABLE DDL command is used to remove a table from the database.
Question
A referential integrity constraint specifies that the existence of an attribute in one table depends upon the existence of a foreign key in the same or another table.
Question
Some DBMS can handle graphic data types,as well as text and numbers.
Question
The DROP command deletes rows from a table individually or in groups.
Question
SQL is both an American and international standard for database access.
Question
A database table is defined using the data definition language (DDL).
Question
SQL originated from a project called System-S.
Question
The ALTER TABLE command is used to change a table definition.
Question
DCL is used to update the database with new records.
Question
A database is maintained and queried using the data mapping language (DML).
Question
A catalog is the structure that contains object descriptions created by a user.
Question
Applications can be moved from one machine to another when each machine uses SQL.
Question
Implementation of a standard can never stifle creativity and innovation.
Question
When creating a table,it is not important to consider foreign key?primary key mates.
Question
The CREATE SCHEMA DDL command is used to create a table.
Question
The SQL command used to populate tables is the INSERT command.
Question
SQL has been implemented only in the mainframe and midrange environments.
Question
The ORDER BY clause sorts the final results rows in ascending or descending order.
Question
When a GROUP BY clause is included in an SQL statement,only those columns with a single value for each group can be included.
Question
The asterisk (*)wildcard designator can be used to select all fields from a table,as well as in WHERE clauses when an exact match is not possible.
Question
The WHERE clause is always processed before the GROUP BY clause when both occur in a SELECT statement.
Question
If multiple Boolean operators are used in an SQL statement,NOT is evaluated first,then AND,then OR.
Question
The ORDER BY clause is the first statement processed in an SQL command.
Question
Adding the DISTINCT keyword to a query eliminates duplicates.
Question
The comparison operators = and != are used to establish a range of values.
Question
Count(*)tallies only those rows that contain a value,while Count counts all rows.
Question
A single value returned from an SQL query that includes an aggregate function is called a vector aggregate.
Question
The following two SQL statements will produce different results.
Select last_name,first_name
from customer
where state = 'MA' or state = 'NY' or state = 'NJ' or state = 'NH' or state = 'CT';
Select last_name,first_name
from customer
where state in ('MA','NY','NJ','NH','CT');
Question
The WHERE clause includes the conditions for row selection within a single table or view,and the conditions between tables or views for joining.
Question
The following query totals sales in state= 'MA' for each salesperson.
Select salesperson_id,sum(sales)
from salesperson
group by salesperson_id
having state = 'MA';
Question
The HAVING clause and the WHERE clause perform the same operation.
Question
The following two SQL statements will produce the same results.
Select last_name,first_name
from customer
where credit_limit > 99 and credit_limit < 10001;
Select last_name,first_name
from customer
where credit_limit between 100 and 10000;
Question
Expressions are mathematical manipulations of data in a table that may be included as part of the SELECT statement.
Question
The following query totals sales for each salesperson.
Select salesperson_id,sum(sales)
from salesperson
group by salesperson_id;
Question
In order to update data in SQL,one must inform the DBMS which relation,columns,and rows are involved.
Question
The FROM clause is the first statement processed in an SQL command.
Question
Indexes generally slow down access speed in most RDMS.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/119
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 6: Introduction to SQL
1
What does the following SQL statement do?
Alter Table Customer_T
Add (Type Varchar (2));

A) Alters the Customer_T table to accept Type 2 Varchars
B) Alters the Customer_T table to be a Type 2 Varchar
C) Alters the Customer_T table, and adds a field called "Type"
D) Alters the Customer_T table by adding a 2-byte field called "Varchar"
C
2
What does the following SQL statement do?
Select * From Customer Where Cust_Type = "Best"

A) Selects all the fields from the Customer table for each row with a customer labeled "best"
B) Selects the "*" field from the Customer table for each row with a customer labeled "best"
C) Selects fields with a "*" in them from the Customer table
D) Selects all the fields from the Customer table for each row with a customer labeled "*"
A
3
________ is a set of commands used to update and query a database.

A) DML
B) DDL
C) DCL
D) DPL
A
4
The command for creating a database is:

A) create table.
B) create view.
C) create schema.
D) create authorization.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
5
Which of the following is a technique for optimizing the internal performance of the relational data model?

A) Avoiding indexes on secondary keys
B) Clustering data
C) Not reporting statistics to save machine resources
D) Using random index organizations
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
6
________ is a set of commands used to control a database,which includes security.

A) DML
B) DDL
C) DCL
D) DPL
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
7
The benefits of a standardized relational language include:

A) application longevity.
B) reduced training costs.
C) cross-system communication.
D) all of the above.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
8
Which of the following questions is answered by the SQL statement?
Select Count (Product_Description)from Product_T;

A) How many products are in the Product Table?
B) How many products have product descriptions in the Product Table?
C) How many characters are in the field name "Product_Description"?
D) How many different columns named "product Description" are there in table Product_T?
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
9
The SQL command ________ adds one or more new columns to a table.

A) create table
B) alter table
C) create view
D) create relationship
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
10
The SQL command ________ defines a logical table from one or more tables or views.

A) create table
B) alter table
C) create view
D) create relationship
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
11
What does the following SQL statement do?
Update Product_T
Set Unit_Price = 775
Where Product_ID = 7

A) Changes the price of a unit called Product_T to 7
B) Changes the unit price of Product 7 to 775
C) Changes the length of the Unit_Price field to 775
D) Updates the Product_T table to have a unit price of 775
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
12
The ________ is the structure that contains descriptions of objects such as tables and views created by users.

A) SQL
B) schema
C) catalog
D) master view
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
13
What does the following SQL statement do?
Delete from Customer_T
Where state = 'HI';

A) Deletes all records from customer_t where the state is equal to HI
B) Removes the customer_t table from the database
C) Deletes all records from the customer_t table
D) None of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
14
The first in a series of steps to follow when creating a table is to:

A) identify columns that must be unique.
B) identify each attribute and its characteristics.
C) create an index.
D) identify columns that must be null.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
15
Any create command may be reversed by using a ________ command.

A) truncate
B) drop
C) delete
D) unpack
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
16
Indexes are created in most RDBMSs to:

A) provide a quicker way to store data.
B) decrease the amount of disk space utilized.
C) provide rapid random and sequential access to base-table data.
D) increase the cost of implementation.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
17
Which of the following is a purpose of the SQL standard?

A) To specify syntax and semantics of SQL data definition and manipulation
B) To specify minimal and complete standards, which permit different degrees of adoption in products
C) To define the data structures and basic operations for SQL databases
D) All of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
18
DDL is typically used during which phases of the development process?

A) Implementation
B) Physical design
C) Analysis
D) All of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
19
What result will the following SQL statement produce?
Select Avg(standard_price)as average from product_v;

A) The average of all products in product_v
B) The average standard_price of all products in product_v
C) The average price of all products
D) None of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
20
In an SQL statement,which of the following parts states the conditions for row selection?

A) Select
B) From
C) Where
D) Group By
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
21
What results will be produced by the following SQL query?
Select sum(standard_price)as total_price
From product_v
Where product_type = 'WOOD';

A) The total price of all products that are of type wood
B) The total price of all products
C) The standard_price of the first wood product in the table
D) The standard_price of any wood product in the table
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
22
What will be returned when the following SQL query is executed?
Select driver_no,count(*)as num_deliveries
From deliveries
Group by driver_no
Having count(*)> 2;

A) A listing of all drivers who made more than 2 deliveries as well as a count of the number of deliveries
B) A listing of all drivers
C) A listing of the number of deliveries greater than 2
D) A listing of all drivers who made more than 2 deliveries
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
23
Which of the following is the wildcard operator in SQL statements?

A) < >
B) *
C) =
D) &
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
24
To eliminate duplicate rows in a query,the ________ qualifier is used in the SQL Select command.

A) alter
B) distinct
C) check
D) specific
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
25
What will be returned when the following SQL statement is executed?
Select driver_no,count(*)as num_deliveries
From deliveries
Group by driver_no;

A) A listing of all drivers, sorted by driver number
B) A listing of each driver as well as the number of deliveries that he or she has made
C) A count of all of the deliveries made by all drivers
D) None of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
26
To get all the customers from Hawaii sorted together,which of the following would be used?

A) Order By
B) Group By
C) Having
D) Sort
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
27
What will result from the following SQL Select statement?
Select min(product_description)
From product_v;

A) The minimum value of product_description will be displayed.
B) An error message will be generated.
C) The first product description alphabetically in product_v will be shown.
D) None of the above.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
28
A single value returned from an SQL query that includes an aggregate function is called a(n):

A) agate.
B) scalar aggregate.
C) vector aggregate.
D) summation.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
29
Which of the following finds all groups meeting stated conditions?

A) Select
B) Where
C) Having
D) Find
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
30
Which of the following counts ONLY rows that contain a value?

A) Count
B) Count(*)
C) Tally(*)
D) Checknum
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
31
Which of the following can produce scalar and vector aggregates?

A) Order By
B) Group By
C) Having
D) Sort
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
32
What will be returned when the following SQL statement is executed?
Select driver_no,count(*)as num_deliveries
From deliveries
Where state = 'MA'
Group by driver_no;

A) A listing of all drivers who made deliveries to state = 'MA', sorted by driver number
B) A listing of each driver who made deliveries to state = 'MA' as well as the number of deliveries that each driver has made to that state
C) A count of all of the deliveries made to state = 'MA' by all drivers.
D) None of the above.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
33
A ________ view is materialized when referenced.

A) virtual
B) dynamic
C) materialized
D) base
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
34
What result set will the following query return?
Select item_no
From order_v
Where quantity > 10;

A) The item_no of all orders that had more than 10 items
B) The order_id of all orders that had more than one item
C) The order_id of all orders that had more than 10 items
D) The item_no of all orders that had 10 or more items
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
35
Which of the following will produce the minimum of all standard prices?

A) Select standard_price from product_v where standard_price = min;
B) Select min(standard_price) from product_v;
C) Select standard_price from min(product_v);
D) Select min(standard_price) from product_v where standard_price = min(standard_price);
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
36
What result set will the following query return?
Select item_no,description
From item
Where weight > 100 and weight < 200;

A) The item_no and description for all items weighing less than 100
B) The item_no for all items weighing between 101 and 199
C) The item_no and description for all items weighing between 101 and 199
D) The item_no for all items weighing more than 200
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
37
Multiple values returned from an SQL query that includes an aggregate function are called:

A) vector aggregates.
B) scalar aggregates.
C) agates.
D) summations.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
38
What result set is returned from the following query?
Select customer_name,telephone
From customers
Where city in ('Boston','New York','Denver');

A) The customer_name and telephone of all customers
B) The customer_name and telephone of all customers living in either Boston, New York or Denver
C) The customer_name and telephone of all customers living in Boston and New York and Denver
D) The customer_name of all customers living in Boston, New York or Denver
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
39
A view may not be updated directly if it contains:

A) the distinct keyword.
B) derived columns and expressions in the select clause.
C) uses the group by or having clause.
D) all of the above.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
40
Which of the following is true of the order in which SQL statements are evaluated?

A) The select clause is always processed first.
B) The select clause is always processed last.
C) The select clause is processed before the order by clause.
D) The group by clause is processed before the where clause.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
41
A major benefit of SQL as a standard is reduced training costs.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
42
When creating tables,it's important to decide which columns will allow null values before the table is created.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
43
One of the original purposes of the SQL standard was to provide a vehicle for portability of database definition and application modules between conforming DBMSs.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
44
The DELETE TABLE DDL command is used to remove a table from the database.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
45
A referential integrity constraint specifies that the existence of an attribute in one table depends upon the existence of a foreign key in the same or another table.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
46
Some DBMS can handle graphic data types,as well as text and numbers.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
47
The DROP command deletes rows from a table individually or in groups.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
48
SQL is both an American and international standard for database access.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
49
A database table is defined using the data definition language (DDL).
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
50
SQL originated from a project called System-S.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
51
The ALTER TABLE command is used to change a table definition.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
52
DCL is used to update the database with new records.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
53
A database is maintained and queried using the data mapping language (DML).
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
54
A catalog is the structure that contains object descriptions created by a user.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
55
Applications can be moved from one machine to another when each machine uses SQL.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
56
Implementation of a standard can never stifle creativity and innovation.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
57
When creating a table,it is not important to consider foreign key?primary key mates.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
58
The CREATE SCHEMA DDL command is used to create a table.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
59
The SQL command used to populate tables is the INSERT command.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
60
SQL has been implemented only in the mainframe and midrange environments.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
61
The ORDER BY clause sorts the final results rows in ascending or descending order.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
62
When a GROUP BY clause is included in an SQL statement,only those columns with a single value for each group can be included.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
63
The asterisk (*)wildcard designator can be used to select all fields from a table,as well as in WHERE clauses when an exact match is not possible.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
64
The WHERE clause is always processed before the GROUP BY clause when both occur in a SELECT statement.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
65
If multiple Boolean operators are used in an SQL statement,NOT is evaluated first,then AND,then OR.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
66
The ORDER BY clause is the first statement processed in an SQL command.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
67
Adding the DISTINCT keyword to a query eliminates duplicates.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
68
The comparison operators = and != are used to establish a range of values.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
69
Count(*)tallies only those rows that contain a value,while Count counts all rows.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
70
A single value returned from an SQL query that includes an aggregate function is called a vector aggregate.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
71
The following two SQL statements will produce different results.
Select last_name,first_name
from customer
where state = 'MA' or state = 'NY' or state = 'NJ' or state = 'NH' or state = 'CT';
Select last_name,first_name
from customer
where state in ('MA','NY','NJ','NH','CT');
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
72
The WHERE clause includes the conditions for row selection within a single table or view,and the conditions between tables or views for joining.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
73
The following query totals sales in state= 'MA' for each salesperson.
Select salesperson_id,sum(sales)
from salesperson
group by salesperson_id
having state = 'MA';
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
74
The HAVING clause and the WHERE clause perform the same operation.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
75
The following two SQL statements will produce the same results.
Select last_name,first_name
from customer
where credit_limit > 99 and credit_limit < 10001;
Select last_name,first_name
from customer
where credit_limit between 100 and 10000;
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
76
Expressions are mathematical manipulations of data in a table that may be included as part of the SELECT statement.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
77
The following query totals sales for each salesperson.
Select salesperson_id,sum(sales)
from salesperson
group by salesperson_id;
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
78
In order to update data in SQL,one must inform the DBMS which relation,columns,and rows are involved.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
79
The FROM clause is the first statement processed in an SQL command.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
80
Indexes generally slow down access speed in most RDMS.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 119 flashcards in this deck.