oracle中,
表结构如下:
create table device
(
id number(10) not null primary key,
dept varchar2(50) not null
)
tablespace users
/
要将dept字段更新成如下内容:select * from message where name='tom'
我试过使用如下的更新语句不行:update device set dept='select * from message where name='tom' ' ;
该如何做呢?
解决方法:
update device set dept='select * from message where name=' 'tom' ' where id=3' ;
执行成功。
原来,是用两个'表示了一个'它大爷啊。。。。什么狗屁语法啊。。。。