Table Hint (SQL Server Compact Edition)

Specifies that the query optimizer use a table scan, one or more indexes, or a locking method with the associated table and for the associated SELECT, INSERT, UPDATE, or DELETE statement. Although this is an option, the query optimizer can typically pick the best optimization method without hints being specified.

Applies to

DELETE (SQL Server Compact Edition)

INSERT (SQL Server Compact Edition)

SELECT Statement (SQL Server Compact Edition)

UPDATE (SQL Server Compact Edition)

Remarks

For a list of locking hints that you can use in Microsoft SQL Server 2005 Compact Edition, see Locking Hints (SQL Server Compact Edition).

Example

The following example selects all rows from the Products table and uses the NOLOCK table hint.

SELECT * FROM Products WITH (NOLOCK)