sql 修改语句
来源:百度知道 编辑:UC知道 时间:2024/07/06 14:03:34
string inSql = "insert into tushuxinxi set uid='" + shukanbianhao + "' where id='" + yonghubianhao + "';
string inSql = "insert into tushuxinxi set bookname='" + shumingzi + "' where id='" + yonghubianhao + "';
大概意思我说下 我想插入 uid 和 bookname插入那一张表 谁能帮忙写成一句
用一句把他表示出来
string inSql = "insert into tushuxinxi set bookname='" + shumingzi + "' where id='" + yonghubianhao + "';
大概意思我说下 我想插入 uid 和 bookname插入那一张表 谁能帮忙写成一句
用一句把他表示出来
哥们 set uid='" + shukanbianhao + "' where id='" + yonghubianhao + "';
是 修改语句 不是插入数据
insert into 表 (字段1,字段2)values(值1,值2) 这是插入语句
你这个语句是错的,首先语法就不对,后面那个单引号没有被双引号括起来。
第二,这个sql语句前面写的insert into但是后面却是update的格式,不知道楼主这是要干什么啊。。。。
insert 语句的 set 没有用过
如果是 update 的话 可以 是
set 语句 两个赋值用逗号连接
string inSql = "update tushuxinxi set uid='" + shukanbianhao + "',bookname='" + shumingzi + "' where id=" + yonghubianhao
我就是被他的语法给晕着了,结果没法回答了
insert tushuxinxi(bookname) select uid from bookname
这个是SQL语句