update (select * from scoreTable as s inner join project as p on p.pid=s.pid ) as w set w.score=1 wupdate (select * from scoreTable as s inner join project as p on p.pid=s.pid ) as wset w.score=1 where w.sid=1 and w.pname='语文'这个语句有错
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 05:06:12
update (select * from scoreTable as s inner join project as p on p.pid=s.pid ) as w set w.score=1 wupdate (select * from scoreTable as s inner join project as p on p.pid=s.pid ) as wset w.score=1 where w.sid=1 and w.pname='语文'这个语句有错
update (select * from scoreTable as s inner join project as p on p.pid=s.pid ) as w set w.score=1 w
update (select * from scoreTable as s inner join project as p on p.pid=s.pid ) as w
set w.score=1 where w.sid=1 and w.pname='语文'
这个语句有错吗
update (select * from scoreTable as s inner join project as p on p.pid=s.pid ) as w set w.score=1 wupdate (select * from scoreTable as s inner join project as p on p.pid=s.pid ) as wset w.score=1 where w.sid=1 and w.pname='语文'这个语句有错
这样写肯定有问题了因为update只能对物理表进行更新,而现在你是在更新子表,那就肯定有问题.不过按你的意思只要改一下就可以了:
UPDATE SCORETABLE
SET SCORE=1 WHERE SID=1 AND PNAME='语文'
WHERE PID IN(SELECT PID FROM PROJECT)