mybatis中@SELECT文エラー:Parameter index out of range(1>number of parameters,which is 0)エラーと解決策
理由:
@SELECTでsqlを書き間違えました.
エラーsql:
正しいsql:
注意して見て、本当に少し違います.(ヒント:引用符...)
@SELECTでsqlを書き間違えました.
エラーsql:
@Select("SELECT id, clientKey AS clientkey, unknow_num AS unknowNum, online_num AS onlineNum, offline_num AS offlineNum, record_date AS recordDate, record_hour AS recordHour, create_time AS createTime FROM device_total WHERE `record_date` = '#{rd}' AND `clientKey` IN (${ck});")
正しいsql:
@Select("SELECT id, clientKey AS clientkey, unknow_num AS unknowNum, online_num AS onlineNum, offline_num AS offlineNum, record_date AS recordDate, record_hour AS recordHour, create_time AS createTime FROM device_total WHERE `record_date` = #{rd} AND `clientKey` IN (${ck});")
注意して見て、本当に少し違います.(ヒント:引用符...)