我在ms access查询中遇到此错误输入必须至少包含一个表或查询

sqserrrh  于 2021-07-29  发布在  Java
关注(0)|答案(1)|浏览(431)

我试图从其他表中插入单个值,但出现了此错误。如果你知道如何修复,那么请修复我的代码。。。
检查此项:

INSERT INTO Library_Records_DB(Book_Name, Student_Roll_Num, Student_Name, Student_Department, Lending_Date)
values
(
"English", 
747, 
(select Full_Name from GCUF_Students_DB_Morning where Roll_Num=747), 
(select Department from GCUF_Students_DB_Morning where Roll_Num=747), 
"01-jan-2020"
)
xv8emn3q

xv8emn3q1#

我会尝试这样的方法:

INSERT INTO Library_Records_DB
    (Book_Name, Student_Roll_Num, Student_Name, Student_Department, Lending_Date)
select "English", Roll_Num, Full_Name, Department, "01-jan-2020"
from GCUF_Students_DB_Morning
where Roll_Num=747

(但我不知道你的数据。select是否返回一行?)

相关问题