A表的字段为serial(number),sqlstatement(varchar2)
现在我要把:select to_char(time,yymmddhh24miss),name from table_B where id=111这条语句作为一个字符串放在A表的sqlstatement字段中,用如下insert语句:
insert into A values (1,“select to_char(time,yymmddhh24miss),name from table_B where id=111”);
提示说:标识过长,不知道该怎么改。 :(
INSERT INTO A
SELECT 1,to_char(time,yymmddhh24miss),name from table_b where id=111;
insert into A values (1,select to_char(time,yymmddhh24miss),name from table_B where id=111);
是啊,用两个单引号就可以了