求 access insert 语句 超简单...
来源:百度知道 编辑:UC知道 时间:2024/06/21 21:36:30
tabel1 字段:id name num
tabel2 字段:id name
知道 label2 的 name
要添加 label2 的 id 进 tabel1
insert into tabel1 (id,name,num) values ((select id from tabel2 where name='a'),'b',1)
不懂怎么写,这个一直错误.用变量好像好不行.
有没有用一条SQL语句就行了的呀?郁闷...
tabel2 字段:id name
知道 label2 的 name
要添加 label2 的 id 进 tabel1
insert into tabel1 (id,name,num) values ((select id from tabel2 where name='a'),'b',1)
不懂怎么写,这个一直错误.用变量好像好不行.
有没有用一条SQL语句就行了的呀?郁闷...
可以先开一个recordset对象对打开的数据库中table2根据label2但值进行查询,另一个变量(cid)存储查询出来的id值,然后关闭该recordset,继续建立另一个recordset对象,进行对table1的写任务.
insert into table1(id,name,num) values(cid,'b',1)
求 access insert 语句 超简单...
insert into 到access
access中insert into 语句问题
vc与ACCESs的连接,insert语句
Access表numbe字段名字段不能insert吗?
delphi中对access数据库进行insert操作出错~
Access数据库能使用insert语句进行插入吗?
[Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。
我向Access插入数据后显示INSERT INTO语法错误!!!
为什么insert into不能插入ACCESS数据库中?