重新编写一下脚本,在脚本的输出中,删除星期后面空格。
-- ch01_2b.sql, version 2.0
SET SERVEROUTPUT ON
DECLARE
v_day VARCHAR2(20);
BEGIN
v_day := TO_CHAR(SYSDATE, 'Day, HH24:MI');
DBMS_OUTPUT.PUT_LINE ('Today is '|| v_day);
END;
Today is Sunday , 20:39
PL/SQL procedure successfully completed.
Today is Sunday, 20:39
修改后的程序:
SET SERVEROUTPUT ON
DECLARE
v_day VARCHAR2(20);
BEGIN
v_day := TO_CHAR(SYSDATE, 'fmDay, HH24:MI');
DBMS_OUTPUT.PUT_LINE ('Today is '|| v_day);
END;
Today is Sunday, 20:39
一天,一个月,一年。总有一天会变得不一样。