+ -
当前位置:首页 → 问答吧 → 插入字段时字符串里含‘--’被注释怎么办?

插入字段时字符串里含‘--’被注释怎么办?

时间:2011-12-18

来源:互联网

RT

作者: zd1217   发布时间: 2011-12-18

SQL code

SQL> create table tempt(
  2  id int,
  3  name varchar(20)
  4  );
SQL> insert into tempt values(1,'hello');
SQL> insert into tempt values(1,'--');
SQL> COMMIT;

create table tempt(
id int,
name varchar(20)
);

SQL> select * from tempt;

        ID NAME
---------- --------------------
         1 hello
         1 --





作者: badyflf   发布时间: 2011-12-18

我用的是PL/SQL,里面被注释掉了
引用 1 楼 badyflf 的回复:

SQL code

SQL> create table tempt(
2 id int,
3 name varchar(20)
4 );
SQL> insert into tempt values(1,'hello');
SQL> insert into tempt values(1,'--');
SQL> COMMIT;

create table tempt(
id in……

作者: zd1217   发布时间: 2011-12-18

热门下载

更多