Query Hint (SQL Server Compact)

Affects all operators in the statement. You can indicate a query hint that should be used throughout an entire query. Query hints are specified as part of the OPTION clause.

Applies to

DELETE (SQL Server Compact)

INSERT (SQL Server Compact)

SELECT Statement (SQL Server Compact)

UPDATE (SQL Server Compact)

Remarks

Only one argument can be used when using a Query Hint with SQL Server Compact 3.5.

  • FORCE ORDER
    Specifies that the join order indicated by the query syntax is preserved during query optimization.

Example

SELECT Orders.[Order ID], Products.[Product Name], [Order Details].[Unit Price] * [Order Details].Quantity AS [Order Total]
FROM Orders INNER JOIN [Order Details] ON Orders.[Order ID] = [Order Details].[Order ID] INNER JOIN Products ON [Order Details].[Product ID] = Products.[Product ID] OPTION (FORCE ORDER)