Queries Cursors Views
Writing Logic Queries
Dynamic SQL Statements
Retrieving Data Multiple Tables
Multiple Table Retrieval
Alternate Queries Aliases
Inserting Data Transact SQL
SQL Statement Punctuation
Inserting Values from another Table
Updating Values from differentr Table
Indexing Query Strategies
Full Text Searching
Defining Full Text Indexes
Implement Full Text Search
Create a DELETE Statement using a Subquery - Exercise
Create a DELETE statement using a subquery
Practice creating a DELETE statement using a subquery.
This exercise is worth a total of 5 points. You will receive up to 5 points for accurately creating the DELETE statement as described in the instructions.
To test your understanding of the relationship between subqueries and joins, use the same instructions as the prior exercise, but construct a subquery instead of selecting values from another table. To review the instructions, use the course project as an example. Remember the Timesheets table looks like this:
The Tasks table looks like this:
The task is to delete all employees from the Timesheets table for tasks that are not chargeable, as listed in the Tasks table. Construct a
statement that uses a subquery from the Tasks table to retrieve the values to be deleted. Do not use a join.
Hint: You need to use an
statement in the
Submitting the exercise
Type or paste your Transact-SQL statement into the text box below, then click
to submit the answer and view a results page.