Home > Database > Mysql Tutorial > MySQL插入数据时插入无效列的解决方法_MySQL

MySQL插入数据时插入无效列的解决方法_MySQL

WBOY
Release: 2016-05-31 08:46:57
Original
954 people have browsed it

1、错误描述

com.mysql.jdbc.exception:jdbc4.MySQLSyntaxErrorException:Unknown column 'man' in 'field list'

2、错误原因

数据库表中的字段:sno sname sage ssex

插入数据时: sno sname sage man

本来是想插入ssex这个字段的值为“man”,结果将man弄成了ssex字段名

3、解决办法

在插入时,给字符串类型的字段值加上双引号

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template