如何获得包含标点符号的长度'
?例子 :-
SELECT LENGTH('A','B','C','D','E','F','G','H','I') FROM dual
SELECT '''A'',''B'',''C'',''D'',''E'',''F'',''G'',''H'',''I''' FROM DUAL;
-- 'A','B','C','D','E','F','G','H','I'
SELECT LENGTH('''A'',''B'',''C'',''D'',''E'',''F'',''G'',''H'',''I''') FROM DUAL;
-- 35
或者
DECLARE
l_str VARCHAR2(100) := q'['A','B','C','D','E','F','G','H','I']';
BEGIN
DBMS_OUTPUT.PUT_LINE(LENGTH(l_str));
END;
-- 35