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.

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


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

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)