MYSQL插入 在线等

来源:百度知道 编辑:UC知道 时间:2024/05/31 13:57:17
应用在JSP中

我有一个表 message
表里面有 id username content reply_content
id是主键 主键是什么意思?
我 insert message(username,content) values(...);
没有插入 reply_content

那我只想插入 username ,content 什么写 语句。。。
请高手解答啊
我只插入
username content
sqlString ="insert message(username,content)"+"values('"+username+"','"+content+"')";

但是还是报错

主键就是能唯一的标识列中的某一行.是用于进行多表连接查询.
你可以这么写:
insert message(username,conten)
value(" "," ")
注意在括号的隐号中填写的内容应该和上面的字段名称对应.