NAME

Question types


Start with


Question limit

of 50 available terms

Print test

50 True/False questions

  1. List showing products without any work orders ?SELECT ProductID
    FROM Production.Product
    EXCEPT
    SELECT ProductID
    FROM Production.WorkOrder;

          

  2. A sample transaction statement might appear as follows:BEGIN TRAN
    DELETE FROM <table_name>

          

  3. There are only three things you need to be sure to identify in your statement to form a proper SELECT query: ___• Inner joins
    • Outer joins
    • Cross joins

          

  4. The vast majority of SQL statements are designed to ___change data in a table or view.

          

  5. JOIN statements can be specified in either the FROM or the WHERE clause, but it is recommended that you specify them in the ___FROM clause.

          

  6. INSERT INTO <table_name> (<columns>)
    VALUES (<values>)

    The <columns> clause would contain your ___
    comma-separated list of the column names in the table you wish to include

          

  7. EXCEPT clause gives you the ___final result set where data exists in the first query and not in the second dataset (returns any distinct values from the left query that are not also found on the right query)

          

  8. The JOIN clause/statementsDROP TABLE <table_name>
    Remove an entire table.

          

  9. SELECT first_name, last_name
    FROM employees
    WHERE department = 'shipping' AND gender = 'F'
    you want a list of all employees who don't work in the shipping department.

          

  10. self-join ???The SQL command for retrieving any data from a database

          

  11. The INTERSECT gives you the ___final result set where values in both of the queries match by the query on both the left and right sides of the operand (returns any distinct values found on both the left and right sides of this operand)

          

  12. There are three types of outer joins:final result set where values in both of the queries match by the query on both the left and right sides of the operand (returns any distinct values found on both the left and right sides of this operand)

          

  13. DELETE statement is structured as follows:DELETE FROM <table_name>
    WHERE <conditions>

          

  14. The WHERE clause could be added to a query to find only those employees who work in the company's shipping department, as shown here:SELECT first_name, last_name
    FROM employees
    WHERE department = 'shipping'

          

  15. To identify more than one column to include in your query, simply type each column name and separate the names with a ___• Open the SSMS interface.
    • Open the table in which you wish to update data.
    • Locate the row in which you wish to update the records within the Open Table view.

          

  16. To update a table using the SSMS graphical interface, you simply need to follow these steps:comma.

          

  17. DROP TABLE statementallows you to combine related data from multiple table sources.

          

  18. There are three types of JOIN statements you should be aware of:• Inner joins
    • Outer joins
    • Cross joins

          

  19. Referential integrity does not allow deletion of tables unless ___...all of the related tables are deleted using a cascading delete.

          

  20. To insert data, you can use ___SSMS or the INSERT statement.

          

  21. The TRUNCATE TABLE statement ___removes the actual data (delete all the rows) from within the table, but it leaves the table structure in place for future use.

          

  22. One of the most common mistakes in database manipulation is the accidental loss of entire tables. The best way to avoid this type of situation in the first place is to ensure that your database uses...

    An entire table can be removed with the DROP TABLE command. The best way to avoid the accidental deletion of entire tables is to use ___
    retrieve user-requested information from a database through the use of queries.

          

  23. The UNION clause...allows you to combine the results of two or more queries into a resulting single set that includes all the rows belonging to the query in that union.

          

  24. Basic rules apply to use of the EXCEPT, INTERSECT and UNION clauses:BEGIN TRAN
    DELETE FROM <table_name>

          

  25. Many times mistakes occur through simple errors, and if you use the ___final result set where values in both of the queries match by the query on both the left and right sides of the operand (returns any distinct values found on both the left and right sides of this operand)

          

  26. SELECT first_name, last_name
    FROM employees
    WHERE NOT department = 'shipping'
    you want a list of all employees who don't work in the shipping department.

          

  27. If you wish to choose all columns from within a table, you can do so by typing an ___square brackets or double quotes—for example, [first name] or "first name"

          

  28. INSERT statement that adds two new employees to our employee table would appear as follows:INSERT INTO employee (first_name, last_name, employee_id, department) VALUES ('David', 'Clark', 610008, 'shipping'),
    ('Arnold', 'Davis', 610009, 'accounting')

          

  29. WHERE department <> 'shipping'

    it will produce the same results:
    SELECT ProductID
    FROM Production.Product
    INTERSECT
    SELECT ProductID
    FROM Production.WorkOrder;

          

  30. The NOT keyword is used to ___search data in terms of what you don't want in your output.

          

  31. Insert data using SQL Server Management Studio:Launch the SSMS application -> connected to the database -> Databases folder -> Tables folder -> Right-click the table name and chose Edit Top 200 Rows -> Enter your data into the last row of the table

          

  32. There are several different ways to remove rows from a table or view:LEFT OUTER JOIN, RIGHT OUTER JOIN, and FULL OUTER JOIN.

          

  33. You can use the DELETE statement to ___remove one or more rows in a table or view.

          

  34. You want to give your boss a list of employees whose salary is above $50,000 per year. You are interested in retrieving only those employees who fit that criteria. .. you could do this in SQL like this: ___SELECT first_name, last_name, salary
    FROM employees
    WHERE salary >= 50,000

          

  35. The syntax of the TRUNCATE statementTRUNCATE TABLE <table_name>

          

  36. Data is most commonly deleted, truncated, or accidentally updated during regular maintenance tasks, and one of the best ways to keep this from occurring is to use ___retrieve user-requested information from a database through the use of queries.

          

  37. You could delete all accounting department employees from a company's employee table if, because of a corporate takeover, they are no longer employed by the company:SELECT * FROM employees

          

  38. INSERT INTO <table_name> (<columns>)
    VALUES (<values>)

    the <values> clause would contain the ___
    values you would like to insert.

          

  39. Cross joins ???can include records from one or both tables you are querying that do not have any corresponding record(s) in the other table.

          

  40. SELECT first_name, last_name, salary
    FROM employees
    WHERE salary >= 50,000
    you want to give your boss a list of employees whose salary is above $50,000 per year.

          

  41. SELECT ???The SQL command for retrieving any data from a database

          

  42. The function of the UPDATE statement is to ___change data in a table or view.

          

  43. You could select all available fields from one table simply by issuing the following command:DELETE FROM employee
    WHERE department = 'accounting'

          

  44. If you need to use a space in your statement, you need to enclose the words in ___square brackets or double quotes—for example, [first name] or "first name"

          

  45. BETWEEN clauseallows you to combine the results of two or more queries into a resulting single set that includes all the rows belonging to the query in that union.

          

  46. Outer joins ???allow you to match related records taken from different source tables.

          

  47. Inner joins ???can include records from one or both tables you are querying that do not have any corresponding record(s) in the other table.

          

  48. Update our employee table to reflect any employees who do not have an assigned department supervisor ___LEFT OUTER JOIN, RIGHT OUTER JOIN, and FULL OUTER JOIN.

          

  49. Retrieve one list showing products with work orders ?SELECT ProductID
    FROM Production.Product
    INTERSECT
    SELECT ProductID
    FROM Production.WorkOrder;

          

  50. INSERT INTO department (first_name, last_name, department_id) VALUES ('Doug', 'Able', 4)Add a record in the department table with our new supervisor's name and department ID information.