0

我无法在 oracle 9i 表中插入电子邮件 ID。我正在使用腻子。

INSERT INTO email(mail_list)values('sundar@abc.com');

我收到以下错误: SQL> INSERT INTO email(mail_list)values('sundar@abc.com'); SP2-0042: unknown command "abc.com')" - rest of line ignored.

腻子不接受@符号。

我在其中一个门户网站中阅读了以下内容:

The problem is common with unix environment with the display terminal keyboard settings. The sqlplus session had trouble interpreting the "@" sign, because it was assigned in the terminal to the "kill" setting.

如何纠正这个问题?

谢谢

桑达尔

4

2 回答 2

1

尝试插入而不必使用 @ 字符。找出ascii值:

SQL>select ascii('@') from dual;
64

然后使用 CHR 功能编写电子邮件地址。

INSERT INTO email(mail_list)values('sundar'||chr(64)||'abc.com');

(我不了解 Putty,所以我使用了我的 SQL 知识)。

于 2013-03-07T12:49:47.857 回答
-2

在 SQL Server 中尝试以下语句:

INSERT INTO tablename(email) VALUES('xyz@gmail.com')
于 2017-06-10T18:15:51.377 回答