Question types

Start with

Question limit

of 50 available terms

Print test

50 Matching questions

  1. To update a table using the SSMS graphical interface, you simply need to follow these steps:
  2. EXCEPT clause gives you the ___
  3. Cross joins ???
  4. You can use the DELETE statement to ___
  5. self-join ???
  6. There are three types of outer joins:
  7. To identify more than one column to include in your query, simply type each column name and separate the names with a ___
  8. Retrieve one list showing products with work orders ?
  9. If you need to use a space in your statement, you need to enclose the words in ___
  10. The UNION clause...
  11. 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: ___
  12. Basic rules apply to use of the EXCEPT, INTERSECT and UNION clauses:
  13. 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 ___
  14. DROP TABLE statement
  15. The syntax of the TRUNCATE statement
  16. To insert data, you can use ___
  17. SELECT first_name, last_name, salary
    FROM employees
    WHERE salary >= 50,000
  18. BETWEEN clause
  19. 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 ___
  20. There are only three things you need to be sure to identify in your statement to form a proper SELECT query: ___
  21. You could select all available fields from one table simply by issuing the following command:
  22. The vast majority of SQL statements are designed to ___
  23. Update our employee table to reflect any employees who do not have an assigned department supervisor ___
  24. The INTERSECT gives you the ___
  25. There are three types of JOIN statements you should be aware of:
  26. SELECT ???
  27. Inner joins ???
  28. INSERT statement that adds two new employees to our employee table would appear as follows:
  29. A sample transaction statement might appear as follows:
  30. The JOIN clause/statements
  31. Referential integrity does not allow deletion of tables unless ___
  32. WHERE department <> 'shipping'

    it will produce the same results:
  33. SELECT first_name, last_name
    FROM employees
    WHERE department = 'shipping' AND gender = 'F'
  34. DELETE statement is structured as follows:
  35. If you wish to choose all columns from within a table, you can do so by typing an ___
  36. INSERT INTO <table_name> (<columns>)
    VALUES (<values>)

    the <values> clause would contain the ___
  37. The function of the UPDATE statement is to ___
  38. INSERT INTO <table_name> (<columns>)
    VALUES (<values>)

    The <columns> clause would contain your ___
  39. SELECT first_name, last_name
    FROM employees
    WHERE NOT department = 'shipping'
  40. 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:
  41. Outer joins ???
  42. List showing products without any work orders ?
  43. There are several different ways to remove rows from a table or view:
  44. JOIN statements can be specified in either the FROM or the WHERE clause, but it is recommended that you specify them in the ___
  45. INSERT INTO department (first_name, last_name, department_id) VALUES ('Doug', 'Able', 4)
  46. The TRUNCATE TABLE statement ___
  47. The NOT keyword is used to ___
  48. 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:
  49. Insert data using SQL Server Management Studio:
  50. Many times mistakes occur through simple errors, and if you use the ___
  1. a - You can identify and delete individual rows from the database using the DELETE syntax,
    - delete all the rows using a truncate table statement, or
    - remove the entire table using the drop table statement.
  2. b SELECT first_name, last_name
    FROM employees
    WHERE department = 'shipping'
  3. c search data in terms of what you don't want in your output.
  4. d INSERT INTO employee (first_name, last_name, employee_id, department) VALUES ('David', 'Clark', 610008, 'shipping'),
    ('Arnold', 'Davis', 610009, 'accounting')
  5. e • Inner joins
    • Outer joins
    • Cross joins
  6. f asterisk (*) in the place where the column name(s) would otherwise be given.
  7. g you may wish to have a table join with itself, say if you want to compare records from within the same table.
  8. h you want to give your boss a list of employees whose salary is above $50,000 per year.
  9. i • Columns to retrieve
    • Tables to retrieve the columns from
    • Conditions, if any, that the data must satisfy
  10. j change data in a table or view.
  11. k transactions when updating data.
  12. l ...all of the related tables are deleted using a cascading delete.
  13. m allows you to specify the range to be used in a "between x and y" query format.
  14. n BEGIN TRAN
    DELETE FROM <table_name>
  15. o SELECT ProductID
    FROM Production.Product
    SELECT ProductID
    FROM Production.WorkOrder;
  16. p BEGIN TRAN and a COMMIT or ROLLBACK while performing maintenance tasks, you will catch most accidents before they happen.
  17. q SELECT first_name, last_name, salary
    FROM employees
    WHERE salary >= 50,000
  18. r DELETE FROM <table_name>
    WHERE <conditions>
  19. s 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.
  20. t DELETE FROM employee
    WHERE department = 'accounting'
  21. u Referential integrity
  22. v can include records from one or both tables you are querying that do not have any corresponding record(s) in the other table.
  23. w SELECT ProductID
    FROM Production.Product
    SELECT ProductID
    FROM Production.WorkOrder;
  24. x TRUNCATE TABLE <table_name>
  25. y ...this query uses the AND conjunction to yield the names of all employees who are in the shipping department and who are female.
  26. z allows you to combine related data from multiple table sources.
  27. aa 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)
  28. ab 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
  29. ac FROM clause.
  30. ad Add a record in the department table with our new supervisor's name and department ID information.
  31. ae remove one or more rows in a table or view.
  32. af square brackets or double quotes—for example, [first name] or "first name"
  33. ag 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)
  34. ah comma-separated list of the column names in the table you wish to include
  35. ai retrieve user-requested information from a database through the use of queries.
  36. aj UPDATE employee
    SET department = 4
    WHERE department IS NULL
  37. ak values you would like to insert.
  38. al you want a list of all employees who don't work in the shipping department.
  39. am • The number and order of the columns must be the same in all queries.
    • The data types must be compatible.
  40. an comma.
  41. ao • 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.
  42. ap SSMS or the INSERT statement.
  44. ar return all rows from one table along with all rows from the other table. WHERE conditions should always be included.
  45. as The SQL command for retrieving any data from a database
  46. at SELECT * FROM employees
  47. au allow you to match related records taken from different source tables.
  48. av DROP TABLE <table_name>
    Remove an entire table.
  49. aw removes the actual data (delete all the rows) from within the table, but it leaves the table structure in place for future use.
  50. ax WHERE NOT department = 'shipping'