doubiao9775 2012-11-19 05:46
浏览 52
已采纳

为什么在导入此.sql文件时出现错误'列计数与第1行的值计数不匹配'?

CREATE TABLE `produtos` ( 
        `sku` varchar(255) NOT NULL DEFAULT '', 
        `_store` varchar(255) NOT NULL DEFAULT '', 
        `_attribute_set` varchar(255) NOT NULL DEFAULT '', 
        `_type` varchar(255) NOT NULL DEFAULT '', 
        `_category` varchar(255) NOT NULL DEFAULT '', 
        `_product_websites` varchar(255) NOT NULL DEFAULT '', 
        `name` varchar(255) NOT NULL DEFAULT '', 
        `price` varchar(255) NOT NULL DEFAULT '', 
        `small_image` varchar(255) NOT NULL DEFAULT '', 
        `special_price` varchar(255) NOT NULL DEFAULT '', 
        `qty` varchar(255) NOT NULL DEFAULT '', 
        `min_qty` varchar(255) NOT NULL DEFAULT '', 
        `use_config_min_qty` varchar(255) NOT NULL DEFAULT '', 
        `is_qty_decimal` varchar(255) NOT NULL DEFAULT '', 
        `backorders` varchar(255) NOT NULL DEFAULT '', 
        `use_config_backorders` varchar(255) NOT NULL DEFAULT '', 
        `min_sale_qty` varchar(255) NOT NULL DEFAULT '', 
        `use_config_min_sale_qty` varchar(255) NOT NULL DEFAULT '', 
        `max_sale_qty` varchar(255) NOT NULL DEFAULT '', 
        `use_config_max_sale_qty` varchar(255) NOT NULL DEFAULT '', 
        `is_in_stock` varchar(255) NOT NULL DEFAULT '', 
        `notify_stock_qty` varchar(255) NOT NULL DEFAULT '', 
        `use_config_notify_stock_qty` varchar(255) NOT NULL DEFAULT '', 
        `manage_stock` varchar(255) NOT NULL DEFAULT '', 
        `use_config_manage_stock` varchar(255) NOT NULL DEFAULT '', 
        `use_config_qty_increments` varchar(255) NOT NULL DEFAULT '', 
        `qty_increments` varchar(255) NOT NULL DEFAULT '', 
        `use_config_enable_qty_increments` varchar(255) NOT NULL DEFAULT '', 
        `enable_qty_increments` varchar(255) NOT NULL DEFAULT '', 
        `_links_related_sku` varchar(255) NOT NULL DEFAULT '', 
        `_links_related_position` varchar(255) NOT NULL DEFAULT '', 
        `_links_crosssell_sku` varchar(255) NOT NULL DEFAULT '', 
        `_links_crosssell_position` varchar(255) NOT NULL DEFAULT '', 
        `_links_upsell_sku` varchar(255) NOT NULL DEFAULT '', 
        `_links_upsell_position` varchar(255) NOT NULL DEFAULT '', 
        `_associated_sku` varchar(255) NOT NULL DEFAULT '', 
        `_associated_default_qty` varchar(255) NOT NULL DEFAULT '', 
        `_associated_position` varchar(255) NOT NULL DEFAULT '', 
        `_tier_price_website` varchar(255) NOT NULL DEFAULT '', 
        `_tier_price_customer_group` varchar(255) NOT NULL DEFAULT '', 
        `_tier_price_qty` varchar(255) NOT NULL DEFAULT '', 
        `_tier_price_price` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `produtos` VALUES   
('RBA01,,Default,simple,Resinas,base,\"Resina: Acrílica Base Água [01 Kg]\",18.9000,/r/e/resina_base_agua_thumb.png,14.9000,0.0000,0.0000,1,0,0,1,1.0000,1,0.0000,1,0,,1,0,1,1,0.0000,1,0,,,,,,,,,,,,,'), 

展开全部

  • 写回答

1条回答 默认 最新

  • douhei8633 2012-11-19 05:50
    关注

    Your values in the INSERT are inside '' and are a single string for that command.

    To elaborate: the error

    Column count doesn't match value count
    

    means that a INSERT command don't have the same number of values and columns. In you example, the insert command is with the default value for columns as you didn't inform any, so it will try to insert data in all columns, but as you value are inside ' ', it's treated as a single string.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部