Set define off -- Insert special characters, such &

Source: Internet
Author: User
When data is inserted, Oracle considers it as a variable and requires a value. The reason is that Oracle defines & as a custom variable.SQL> show all
Appinfo is off and set to "SQL * Plus"
Arraysize 15
Autocommit off
Autoprint off
Autorecovery off
Autotrace off
Blockterminator "." (hex 2e)
Btitle off and is the first few characters of the next SELECT statement
Eclipsep off
Colsep ""
Compatibility version native
Concat "." (hex 2e)
Copycommit 0
Copytypecheck is on
Define "&" (hex 26)
Describe depth 1 linenum off indent on
Echo off
Editfile "afiedt. Buf"
Embedded off
Escape off
Escchar off
...... Set define off to insert the value containing.Using the set define off command

To avoid the prompt in the preceding example by usingSET DEFINE OFFCommand, change the entry to the following:

SET DEFINE OFFCREATE TABLE "Employees & Managers" (    Employees varchar(16),     Managers varchar(16));

Set define off

Set define off disables the parsing of commands to replace
Substitution variables with their values.

Note:If it is executed in Toad, we recommend that you add the preceding statement to the first line of each script to be imported to disable define. Otherwise, when you import the second script containing special characters, an error occurs.
If it is executed in SQL * Plus, you only need to set define off once, and then you can import it continuously. Until you reset define on.






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.