set define off - 특수 문자 삽입, 예 를 들 어 &

1496 단어 Oaclesqldefine
데 이 터 를 삽입 할 때 Oacle 은 변수 로 생각 하고 입력 값 을 요구 합 니 다.
이 유 는 Oacle 이 & 사용자 정의 변수 로 정의 하기 때 문 입 니 다.
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
cmdsep 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 만 있 으 면 포함 & 값 을 삽입 할 수 있 습 니 다.
Using the SET DEFINE OFF Command
To avoid the prompt in the preceding example by using the SET DEFINE OFF command, change the entry to the following:
SET DEFINE OFF

CREATE 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.
메모: TOAD 에서 실 행 될 경우 가 져 올 스 크 립 트 의 첫 줄 에 앞 에 있 는 define 을 닫 는 것 을 권장 합 니 다. 그렇지 않 으 면 두 번 째 특수 문자 가 있 는 스 크 립 트 를 가 져 올 때 오류 가 발생 합 니 다.        SQL * PLUS 에서 실행 되 는 경우 define OFF 를 한 번 만 설정 하면 다음 에 연속 으로 가 져 올 수 있 습 니 다.define ON 을 다시 설정 할 때 까지

좋은 웹페이지 즐겨찾기