从oracle到javascript的多行字符串

时间:2018-05-27 19:59:52

标签: javascript sql oracle

我有一个CLOB列,名为补充多行字符串,这在oracle数据库中运行良好,但由于多行原因无法在javascript上运行,有没有人知道如何使用javascript工作?

 SELECT DBMS_LOB.substr((A.SUPPLEMENTARY,3000))  FROM PLACENAMES A

1 个答案:

答案 0 :(得分:0)

    CREATE TABLE PLACENAMES
        ("SUPPLEMENTARY" CLOB)
    ;

    INSERT ALL 
        INTO PLACENAMES ("SUPPLEMENTARY")
             VALUES ('Hello Stackoverflow')
    SELECT * FROM dual
    ;

    SELECT DBMS_LOB.substr(A.SUPPLEMENTARY,5)  FROM PLACENAMES A

    |  TEXT |
    |-------|
    | Hello |

SQL Fiddle DEMO

等于

var text = "Hello Stackoverflow".substring(0,5);
alert(text);