13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.130 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.1313:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.13

.

.

Wednesday, July 28, 2010

Ethan Castanon - Test Score: Introduction to SQL at Expert Rating: 97%

  Resources     Lessons     Quizzes     Assignments     Discussion     Completion  
Browser Back Button Introduction to SQL
completion: final exam results
Final Exam

Evaluation of your answers:

  1. Which of the following terms relates tables to one another in a relational-database structure?

    You chose: Key

    Correct! To relate two tables to one another in a relational-database structure, you must use keys.

  2. Why won’t the following SQL statement work?

    CREATE TABLE Products
    (
    ProductID CHAR (10) PRIMARY KEY NOT NULL,
    Table CHAR (10) NOT NULL,
    ProductName CHAR (30) NOT NULL,
    ProductPrice MONEY NOT NULL);

    You chose: The column named table causes an error.

    Correct! You cannot use a keyword (Table) as a column name.

  3. Which of the following is considered the most widely used type of database?

    You chose: Relational database

    Correct! The relational database is the most popular choice of most.

  4. Which of the following punctuation marks is used to tell a database where the query ends?

    You chose: Semicolon

    Correct! The semicolon is especially useful when dealing with multiple SQL statements.

  5. Which of the following keywords is used to display columns?

    You chose: SELECT

    Correct! The SELECT keyword is used to tell the database which columns to display.

  6. Which of the following terms governs how SQL must be written?

    You chose: Syntax

    Correct! Syntax refers to rules that govern how SQL must be written.

  7. Which of the following clauses allows you to sort column data in ascending or descending order?

    You chose: ORDER BY

    Correct! The ORDER BY clause retrieves the name of one or more columns from the SELECT statement and then sorts (ascending or descending) the output.

  8. Which of the following operators is used to perform wildcard-character filtering?

    You chose: LIKE

    Correct! LIKE is used to filter data that fits a pattern.

  9. Which of the following SQL statements will not work?

    You chose: SELECT FROM EMPLOYEES;

    Correct! This query will not work because it does not select any columns.

  10. Why won’t the following SQL statement work?

    SELECT AVG (Price) AS Ressult
    FROM Records
    WHERE RecordID NOT IN ('A1' 'A2' 'A3');

    You chose: The query is missing two commas.

    Correct! The RecordID’s in the WHERE clause should be separated by commas; ('A1', 'A2', 'A3');

  11. Which of the following symbols is used to bring two columns together to form a single column?

    You chose: &

    Correct! The ampersand (&) is a character operator used to bring two columns together to form a single column.

  12. Which of the following terms is defined as "a substitute name for a field or value"?

    You chose: Alias

    Correct! An alias is a substitute name for a field or value.

  13. Which of the following functions returns the number of rows in a column?

    You chose: COUNT ()

    Correct! The COUNT () function returns the number of rows in a column.

  14. Which of the following keywords is used to specify a specific search criterion (filter) on a group of data?

    You chose: HAVING

    Correct! The HAVING clause enables you to specify specific search criteria (filter) on groups of data.

  15. Which of the following statements describes what the AVG keyword is used for?

    You chose: It is used to return the average of a column.

    Correct! The AVG keyword is used as a function to return the average of a column.

  16. Which of the following statements best defines the term subquery?

    You chose: A subquery is a query nested inside another query, and passes its values to another query.

    Correct! Subqueries are nested inside other queries.

  17. Which of the following must be used to create a subquery?

    You chose: Parentheses

    Correct! All subqueries must be surrounded in parentheses.

  18. Combining a table name with a column name, so there is no question as to which table the column name refers to, is known as what?

    You chose: Qualification

    Correct! Qualification of column names makes the subquery more straightforward.

  19. Which of the following matches values of a column in one table to the corresponding values in another table?

    You chose: Inner join

    Correct! The inner join matches values of a column in one table to the corresponding values in another table.

  20. Which of the following SQL statements will not work using standard SQL?

    You chose: SELECT NumberID, Firstnumber, MAX (Number) AS HighestNumber
          FROM Statistics
          GROUP BY NumberID;


    Correct! When you use the GROUP BY clause, every column you display in the SELECT statement must also be present in the GROUP BY clause. The Firstnumber column should be in the GROUP BY clause.

  21. Which of the following can be used to eliminate multiple occurrences of data?

    You chose: Natural join

    Correct! The natural join can be used to eliminate multiple occurrences of data.

  22. Which of the following terms is used to change values already stored in a database?

    You chose: UPDATE

    Correct! The UPDATE statement is used to change values already stored in a database.

  23. How many columns will the following query display?

    SELECT AlbumName, Artist,
    (SELECT COUNT (*) FROM Sales
    WHERE Sales.AlbumID = Songs.AlbumID) AS Total
    FROM Songs
    ORDER BY AlbumName;

    You chose: Three

    Correct! This query displays three columns; AlbumName, Artist, and Total

  24. Which of the following terms is not used to add data (rows) to tables?

    You chose: AS

    Correct! The AS keyword is used to substitute a name for a field or value and is not found within the INSERT statement.

  25. Which of the following is used to tell the DBMS that a column must have a value?

    You chose: NOT NULL

    Correct! NOT NULL instructs that a value must be inserted in a specified column.

  26. Why won't the following query run?

      CREATE TABLE Students
      (
      SSN CHAR (11) Primary Key NOT NULL,
      FirstName CHAR(50) NOT NULL,
      LastName char (50) NOT NULL,
      Address CHAR (50),
      Phone CHAR (20);

    You chose: No closing parenthesis

    Correct! There should be a closing parenthesis before the semicolon.

  27. Which of the following terms is used to delete a table from the database?

    You chose: DROP TABLE

    Correct! DROP TABLE is used to delete a table from the database.

  28. Which of the following is not an operation that views perform?

    You chose: Creating new tables

    Correct! Views cannot be used to create new tables.

  29. Which of the following statements best describes the term view?

    You chose: A view reflects the selection of data from two or more tables without a specification of a relationship between tables.

    Incorrect. This describes a Cartesian product. Correct answer: A view enables you to store a query on one or more tables.

  30. Which of the following keywords is (are) used to delete a view?

    You chose: DROP

    Correct! DROP is used to delete a view from a database.

  31. Which of the following terms is used to undo specified SQL statements?

    You chose: ROLLBACK

    Correct! ROLLBACK causes the DBMS to undo specified SQL statements when errors occur.

  32. Which of the following terms is not a constraint keyword?

    You chose: FIELD SIZE

    Correct! The field size is the maximum number of characters that can be entered into a cell.

  33. Which of the following terms sorts columns in ascending order and then stores the sorted data in a separate location on the computer, with a pointer to the actual data?

    You chose: Index

    Correct! An index sorts columns in ascending order and then stores the sorted data in a separate location on the computer, with a pointer to the actual data.

  34. Which of the following terms is defined as "one or more SQL statements stored inside a database"?

    You chose: Stored procedure

    Correct! A stored procedure is one or more SQL statements stored inside a database.

  35. Which of the following is a stored procedure that executes in response to an INSERT, UPDATE, or DELETE statement?

    You chose: Trigger

    Correct! A trigger is a stored procedure that executes in response to an INSERT, UPDATE, or DELETE statement.

  36. Which of the following terms is used to specify which rows to retrieve when creating a cursor?

    You chose: FETCH

    Correct! The FETCH statement is used to specify which rows to retrieve.

Your score: 97% (out of 100%). Excellent job!
Final Exam
Date submitted: 07/28/2010 06:57:22 PM (PDT)

Please print this evaluation for your records.