整数值不正确:“"列 [英] Incorrect integer value: '' for column

查看:117
本文介绍了整数值不正确:“"列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下查询中出了什么问题? 我想将某些字段从一个表复制到另一个表.

What wrong in the following query? I want to copy some fields from one table to another.

INSERT INTO `dle_post_plus` 
(
   `news_id`, `news_read`, `allow_rate`, `rating`, 
   `vote_num`, `votes`, `view_edit`, `access`, 
   `editdate`, `editor`, `reason`, `user_id`
) 
SELECT `id`, `news_read`, `allow_rate`, `rating`, 
   `vote_num`, `votes`, `view_edit`, `access`, 
   `editdate`, `editor`, `reason`, `user_id` 
FROM `dle_post` 
LEFT JOIN dle_users 
  ON (dle_post.autor=dle_users.name)

错误:

#1366 - Incorrect integer value: '' for column 'editdate' at row 1

推荐答案

确保两个表中的所有列均为同一类型.检查editdate.可能在dle_post_plus中该列为INT,而在dle_post中该列为varchar.

Make sure all columns are the same type in both tables.Check editdate.Probably in dle_post_plus the column is INT and in dle_post is varchar.

这篇关于整数值不正确:“"列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆