關于accept num prompt
源代碼:
? 1 ?accept num prompt '請輸入一個數字';
? 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('為負數');
? 8 ? ? else dbms_output.put_line('為正數');
? 9 ? ? end if;
?10 ?exception
?11 ? ? when e then
?12 ? ? dbms_output.put_line('不是數字');
?13* end;
SQL> /
輸入 num 的值: ?5
原值 ? ?3: ? ? ?i number :=#
新值 ? ?3: ? ? ?i number :=5;
accept num prompt '請輸入一個數字';
*
第 1 行出現錯誤:
ORA-00900: 無效 SQL 語句
我現在用sql*plus再來執行這段代碼,結果系統不知道搞什么,根本不能傳值(地址)成功,我不大懂啊…………
2022-03-25
利用顏色的16位進制代碼加#號轉化成顏色第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('為負數');
? 7? ?else dbms_output.put_line('為正數');
? 8? ?end if;
? 9* end;
我是這樣可執行?。?/p>
2015-10-15
剛才看到SQL*PLUS只支持number,char和date數據的輸入……難道是?