Databases Reference
In-Depth Information
Finally, run the following query once:
UPDATE
dbo
.
SalesOrderDetail
SET
ProductID
=
666
WHERE
ProductID
=
927
Listing 4-31.
Note that the
UPDATE
statement is doing an Index Seek and a Table Update, so
user_seek
will be updated for the index, and
user_updates
will be updated
once for both the non-clustered index and the heap. This is the final output of the
query in Listing 4-27 (edited for space):
name index_id user_seeks user_scans user_lookups user_updates
------------ -------- ---------- ---------- ------------ ------------
NULL 0 0 3 4 1
IX_ProductID 2 7 0 0 1
Listing 4-32.
Finally, drop the table you just created:
DROP
TABLE
dbo
.
SalesOrderDetail
Listing 4-33.