關(guān)于accept num prompt
源代碼:
? 1 ?accept num prompt '請輸入一個數(shù)字';
? 2 ?declare
? 3 ? ? i number :=#
? 4 ? ? e expection;
? 5 ?begin
? 6 ? ? if i=0 then dbms_output.put_line('為0');
? 7 ? ? elsif i<0 then dbms_output.put_line('為負(fù)數(shù)');
? 8 ? ? else dbms_output.put_line('為正數(shù)');
? 9 ? ? end if;
?10 ?exception
?11 ? ? when e then
?12 ? ? dbms_output.put_line('不是數(shù)字');
?13* end;
SQL> /
輸入 num 的值: ?5
原值 ? ?3: ? ? ?i number :=#
新值 ? ?3: ? ? ?i number :=5;
accept num prompt '請輸入一個數(shù)字';
*
第 1 行出現(xiàn)錯誤:
ORA-00900: 無效 SQL 語句
我現(xiàn)在用sql*plus再來執(zhí)行這段代碼,結(jié)果系統(tǒng)不知道搞什么,根本不能傳值(地址)成功,我不大懂啊…………
2022-03-25
利用顏色的16位進制代碼加#號轉(zhuǎn)化成顏色第12行代碼換成document.write("<br>");就可以了
2018-03-10
? 1? declare
? 2? accept number ;
? 3? i number :=#
? 4? begin
? 5? ?if i=0 then dbms_output.put_line('為0');
? 6? ? elsif i<0 then dbms_output.put_line('為負(fù)數(shù)');
? 7? ?else dbms_output.put_line('為正數(shù)');
? 8? ?end if;
? 9* end;
我是這樣可執(zhí)行??!
2015-10-15
剛才看到SQL*PLUS只支持number,char和date數(shù)據(jù)的輸入……難道是?