The following query works in MySql 5.0
SELECT SQL_NO_CACHE
ItemId,
AnotherColumn
FROM
TableOne
UNION
SELECT SQL_NO_CACHE
ItemId,
AnotherColumn
FROM
TableTwo
But in MySql 5.5 I get the following error:
MySql.Data.MySqlClient.MySqlException: Improper use / allocation of 'SQL_NO_CACHE'
What is the proper placement of SQL_NO_CACHE queries for UNION?
If I put SQL_NO_CACHE on one side of UNION, will it affect both sides?
source
share