위의 코드에서 schemaname을 입력으로 지정하고 해당 입력을 사용하여 데이터베이스에 연결해야합니다. 그러나이 경우 입력 한 값은 schemaname에 의해 취해지지 않습니다. 이것은 밖으로 넣어하는 방법과 오류는 다음과 같습니다Variable-Oracle 사용
declare schemaname varchar2(20);
exec :schemaname := XYZ;
BEGIN
end;
Error report -
ORA-06550: line 2, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national character
nchar
ORA-06550: line 4, column 1:
PLS-00103: Encountered the symbol "CONNECT" when expecting one of the following:
어느 한 그것이 declare
및 end
사이에 스풀
: \ ABC.LST' 접미사가 주어지지되면서, '@'의 기본값은'C : \ ABC.SQL'입니다. 그래서 그들은 같은 파일이 아닙니다. 혼란을 피하기 위해 적어도 스풀 이름을 전체적으로보기를 원합니다 ... –