要用变量的话,使用&blname
例如:
SQL> select &a from a1;
输入a的值: bbb
原值 1:select &a from a1
新值 1:select bbb from a1BBB
----------
AAA
BBB
AAA
CCC
CCC
CCC
AAA
AAA
0001
0002
asd已选择11行。
例如:
SQL> select &a from a1;
输入a的值: bbb
原值 1:select &a from a1
新值 1:select bbb from a1BBB
----------
AAA
BBB
AAA
CCC
CCC
CCC
AAA
AAA
0001
0002
asd已选择11行。
在pl/sql块里
blname varchar2(10);
t_name number(8,3);
t_id tbname.id%type;
方法有好几种
如果是,那应该是没有联编变量
如果是,那应该是没有联编变量
:PRE_SER09_01
是什么东西,怎样把值传给他?请详细一点解释!
如果要把FORM中的语句拿到SQL*PLUS里去运行,
最好先把联编变量取个具体数值再执行。
如:WHERE (PRE_SER02_03 = :STYLE OR :STYLE IS NULL)真的没人可以帮助我吗?
如:WHERE (PRE_SER02_03 = :STYLE OR :STYLE IS NULL)真的没人可以帮助我吗?
SQL/PLUS中还有这样的写法 :PRE_SER09_01
以前没见过,有介绍SQL/PLUS语法的链接吗?我要定义这样的变量,使用这种变量
SQL/PLUS中还有这样的写法 :PRE_SER09_01
以前没见过,有介绍SQL/PLUS语法的链接吗?我要定义这样的变量,使用这种变量
declare
n number;
begin
n:=1;
delete from tb;
loop
insert into tb(name,age) values('n'||to_char(n),n);
n:=n+1;
if mod(n,1000)=0 then
commit;
end if;
exit when n=500000;
end loop;
end;
/
declare
n number;
begin
n:=1;
delete from tb;
loop
insert into tb(name,age) values('n'||to_char(n),n);
n:=n+1;
if mod(n,1000)=0 then
commit;
end if;
exit when n=500000;
end loop;
end;
/
declare
n number;
begin
n:=1;
delete from tb;
loop
insert into tb(name,age) values('n'||to_char(n),n);
n:=n+1;
if mod(n,1000)=0 then
commit;
end if;
exit when n=500000;
end loop;
end;
/
在SQL语句段前面加上即可
define PRE_SER09_01= your value