-4

如何获得包含标点符号的长度'?例子 :-

SELECT LENGTH('A','B','C','D','E','F','G','H','I') FROM dual
4

1 回答 1

0
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
于 2013-06-19T14:29:11.330 回答