0
我越來越Truncated incorrect INTEGER value: 'D'
警告,而我試圖運行下面的查詢:「截斷不正確INTEGER值」錯誤
UPDATE MESSAGES
SET status = CASE
WHEN
(from_id='111111111' AND status='A') THEN 'S'
WHEN
(to_id ='111111111' AND status='A') THEN 'R'
WHEN
((from_id ='111111111' AND status='R') OR
(to_id ='111111111' AND status='S')) THEN 'D'
END
WHERE primary_key = '236499681204'
AND
(CASE
WHEN
(from_id='111111111' AND status='A') THEN 'S'
WHEN
(to_id ='111111111' AND status='A') THEN 'R'
WHEN
((from_id ='111111111' AND status='R') OR
(to_id ='111111111' AND status='S')) THEN 'D'
END) is not null
我看了帖子MySQL 'Truncated incorrect INTEGER value'和MYSQL Truncated incorrect INTEGER value error。但他們不適用於我的情況。這裏,status
是VARCHAR(1)
的類型。
有什麼我失蹤了嗎?
編輯
這裏的查詢創建表:
CREATE TABLE `MESSAGES` (
`primary_key` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
`from_id` varchar(9) NOT NULL,
`to_id` varchar(9) NOT NULL,
`status` varchar(1) NOT NULL,
PRIMARY KEY (`primary_key`)
) ENGINE=MyISAM AUTO_INCREMENT=123456789876 DEFAULT CHARSET=latin1
請幫助:(
您好再次:)。你是如何定義'primary_key'字段的? – Parado
請顯示您的表格定義 –
'MySQL!= SQL' – NullUserException