IT-2300 Multiple Choice Study

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which of the following SQL statements counts the rows in the 'Sales' table? A) SELECT COUNTER(*) FROM Sales B) SELECT COUNT(*) IN Sales C) SELECT NUM() FROM Sales D) SELECT COUNT(*) FROM Sales

D

Which of the following is a SQL aggregate function? A) LEN B) JOIN C) LEFT D) AVG

D

What does follow after the SQL SELECT clause? The name of the database server. The name of the table we are selecting from. List of columns that will be selected or the * symbol.

List of columns that will be selected or the * symbol.

Which SQL statement selects all rows from a table called Products and orders the result set by ProductID column? SELECT * FROM Products ORDER BY ProductID SELECT * FROM Products WHERE ProductID > 200 SELECT ProductID FROM Products SELECT * FROM Products ORDERED BY ProductID

SELECT * FROM Products ORDER BY ProductID

The BETWEEN SQL keywords specify ... A) a column list. B) a range to test in the SQL query search condition. C) a list of values.

B

What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT(Order) >5; A) Selects the total number of orders from the Sales table, if this number is greater than 5. B) Selects all customers from table Sales that have made more than 5 orders. C) Selects all Customers from the Sales table.

B

What follows after the SQL WHERE clause? A) The name of the table we are selecting from. B) Definition of the condition to be met for the rows to be returned. C) A list of columns to be selected.

B

What is a foreign key? A) The foreign key is a SQL locking mechanism. B) A foreign key is a key field (column) in a database table, which relates the table to another table where the key is a primary key. The primary-foreign key relations are used to cross-reference database tables. C) The foreign key is a column that can have NULL values.

B

What is a primary key? A) The primary key is a column that can have NULL values. B) The primary key is a column or combination of columns whose values uniquely identify each row in the table. C) The primary key column is a column or combination of columns whose values can be non-unique.

B

What is the ABS SQL function used for? A) To return the average value of a numeric expression. B) To return the absolute, positive value of a numeric expression. C) To return the maximum value of a numeric expression. D) To return the minimum value of a numeric expression.

B

What is the difference between the WHERE and HAVING SQL clauses? A) The WHERE and the HAVING clauses are identical. B) The WHERE SQL clause condition(s) is applied to all rows in the result set before the HAVING clause is applied (if present). The HAVING clause is used only with SELECT SQL statements and specifies a search condition for an aggregate or a group. C) The HAVING SQL clause condition(s) is applied to all rows in the result set before the WHERE clause is applied (if present). The WHERE clause is used only with SELECT SQL statements and specifies a search condition for an aggregate or a group.

B

Which SQL function is used to count the number of rows in a SQL query? A) NUMBER() B) COUNT() C) SUM()

B

Which of the following SQL statements is correct? A) SELECT CustomerName, COUNT(CustomerName) FROM Orders B) SELECT CustomerName, COUNT(CustomerName) FROM Orders GROUP BY CustomerName C) SELECT CustomerName, COUNT(CustomerName) FROM Orders ORDER BY CustomerName

B

Which of the following SQL statements selects the total number of orders from the Sales table? A) SELECT AVG(OrderNumber) FROM Sales B) SELECT COUNT(*) FROM Sales C) SELECT SUM(OrderNumber) FROM Sales

B

Which of the following is a SQL aggregate function? A) RIGHT B) MIN C) LEFT D) CAST

B

The AVG SQL function returns the ... A) maximum value from a column. B) the sum of values in a column. C) average of the values in a group.

C

The FROM SQL clause is used to: A) specify range for search condition B) specify search condition C) specify what table we are selecting or deleting data from.

C

The LIKE SQL keyword is used along with ... A) ORDER BY clause. B) JOIN clause. C) WHERE clause. D) GROUP BY clause.

C

The NULL SQL keyword is used to ... A) represent 0 value. B) represent negative infinity. C) represent a missing or unknown value. D) represent positive infinity.

C

What does the FROM SQL keyword specify? A) The FROM SQL keyword specifies a search condition. B) The FROM SQL keyword specifies a column list. C) The FROM SQL keyword specifies the tables used in SELECT.

C

What does the SQL FROM clause do? A) Specifies the columns we are retrieving. B) Specifies a search condition. C) Specifies the tables to retrieve rows from.

C

What is the purpose of the SQL AS clause? A) The AS clause is used with the JOIN clause only. B) The AS clause defines a search condition. C) The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column.

C

What will be the result of the following SQL statement: SELECT * FROM Table1 HAVING Column1 > 10; A) The result will be empty data set. B) The SQL statement will generate an error. C) The result will be all rows from Table1 which have Column1 values greater than 10.

C

Which SQL keyword is used to retrieve a maximum value? A) MOST B) TOP C) MAX D) UPPER

C

Which SQL statement selects all rows from a table called Products and orders the result set by ProductID column? A) SELECT ProductID FROM Products B) SELECT * FROM Products ORDERED BY ProductID C) SELECT * FROM Products ORDER BY ProductID D) SELECT * FROM Products WHERE ProductID > 200

C

Which of the following SQL statements counts the rows in the 'Sales' table? A) SELECT COUNTER(*) FROM Sales B) SELECT COUNT(*) IN Sales C) SELECT COUNT(*) FROM Sales D) SELECT NUM() FROM Sales

C

Which of the following SQL statements has correct syntax? A) SELECT * FROM Table1 WHERE Column1 = = 10 B) SELECT * FROM Table1 WHERE Column1 => 10 C) SELECT * FROM Table1 WHERE Column1 >= 10

C

Which of the following SQL statements will select all records with all their columns from a table called Sales? A) DELETE FROM Sales B) SELECT * FROM SALES WHERE OrderID < 1 C) SELECT * FROM Sales

C

Can the SELECT clause list have a computed value like in the example below? SELECT CustomerName, UnitPrice * NumberofUnits FROM Sales; A) Yes. B) No.

A

If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default: A) ASC B) DESC C) There is no default value.

A

RDBMS stands for: A) Relational Database Management System B) Read Database Master System C) Really neat Database Management System

A

The BETWEEN SQL keyword specifies ... A) a range to test in the SQL query search condition. B) a list of values. C) a column list.

A

The table columns are also known as... A) Fields B) Records C) Woopals

A

What does SQL stand for? A) Structured Query Language. B) Strict Query Language. C) Strong Query Language. D) Standard Query Language.

A

What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT(Order) >5; A) Selects all customers from table Sales that have made more than 5 orders. B) Selects all Customers from the Sales table. C) Selects the total number of orders from the Sales table, if this number is greater than 5.

A

What does the term 'locking' refer to? A) Locking is a process preventing users from reading data being changed by other users, and prevents concurrent users from changing the same data at the same time. B) Locking is the process of database authentication. C) Locking is a process, which logs database usage.

A

What is the purpose of the SQL AS clause? A) The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column. B) The AS clause is used with the JOIN clause only. C) The AS clause defines a search condition.

A

Which of the following 3 SQL statements is correct? A) SELECT Username, Password FROM Users B) SELECT Username ; Password FROM Users C) SELECT Username, Password WHERE Username = 'user1'

A

Which of the following SQL clauses is used to sort a result set? A) ORDER BY B) ARRANGE C) ORDERED BY D) SORT

A

Which of the following statements gets the total value of the column 'Price' in the 'Sales' table? A) SELECT SUM(Price) FROM Sales B) SELECT ADD(Price) FROM Sales C) SELECT SUM(Price) WHERE Sales D) SELECT TOTAL(Price) FROM Sales

A

Can you use both HAVING and WHERE SQL clauses in one SQL statement? A) No. B) Yes.

B

Can you use both SELECT and WHERE SQL clauses in one SQL statement? A) No. B) Yes.

B


Kaugnay na mga set ng pag-aaral

Lowdermilk Chapter 28: Hemorrhagic Disorders

View Set

Chapter 8 SOCIAL RESPONSIBILITY AND ETHICS IN MANAGEMENT

View Set

Corporate Finance BUSI 320 Chapter 8 & 9

View Set

Chapter 13: Labor and Birth Process

View Set