另外还有一个问题(总是不能解决两个表间的关系)
insert into B(nob) select noa from A;将A表内容插入B表没问题
我想做的是只插入A.noa=B.nob的记录
insert into B(nob) select noa from A where A.noa=B.nob;
提示B.nob为无效列名。
delelte B where B.nob=A.noa删除B表中B.nob=A.noa也是这个问题
这样更新不对吧
如果 A.noa!=B.nob 的行会把B.sl 设为null [email protected] >update emp set ename=(select dname from dept where dept.deptno=emp.deptno)
2where exists ( select deptno from dept where dept.deptno=emp.deptno);