[TIP] How to insert a string containing '&' in SQL * PLUS?

zhaozj2021-02-16  45

[TIP] How to insert a string containing '&' in SQL * PLUS?

Method A command in SQL * Plus: set define OFF

Method 2 (Recommended) See the following example:

SQL> TRUNCATE TABLE DEMO;

Table truncated.

SQL> SELECT *.

No rows selected

SQL> DESC DEMO;

Name NULL? TYPE --------------------------------------------- --- ----------------- x char (20)

SQL> INSERT INTO DEMO VALUES ('Scott &' || 'Tiger');

1 row created.

SQL> SELECT *.

X -------------------- Scott & Tiger

转载请注明原文地址:https://www.9cbs.com/read-27595.html

New Post(0)