Table Hint (SQL Server Compact)

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)

INSERT (SQL Server Compact)

SELECT Statement (SQL Server Compact)

UPDATE (SQL Server Compact)

Remarks

For a list of locking hints that you can use in SQL Server Compact, see Locking Hints.

Example

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

SELECT * FROM Products WITH (NOLOCK)