2017-04-12 17 views
0

私はエラーコード:1267照合順序の不正なミックス(utf8_general_ci、IMPLICIT)及び(latin1_swedish_ci、NUMERIC)操作のための '=' エラーの簡単な選択クエリに

#1267取得しています - 照合順序の不正なミックス(utf8_general_ciを、暗黙的)および操作のための(latin1_swedish_ci数値) '='

Iが表Bの照合順序を変更しようとした

SELECT * FROM 
sm_product_inventories_list 
WHERE inventory_date = CURDATE() 
AND inventory_time = CURTIME() 

クエリの下に、このエラーy

ALTER TABLE sm_product_inventories_list CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci 

まだ間違いがあります。 inventory_dateのタイプはdateで、inventory_timeはvarcharです

ありがとうございます。

+0

を "バイナリ" を追加するのですか? –

答えて

0

迅速な解決策は、 `CAST(TIME AS inventory_time)は`動作します、次のように比較する前

WHERE binary inventory_date = binary CURDATE() AND binary inventory_time = binary CURTIME()

+0

ありがとう、それは完璧に動作します......... –

関連する問題