clob 测试版
1CREATE TABLE sammy_test_clob (
2
3
4
5ID NUMBER,
6
7site VARCHAR2(4000),
8
9mail_data CLOB
10
11
12
13)
14
15
16
17INSERT INTO sammy_test_clob
18
19 VALUES ( 1, 'BQA', EMPTY_CLOB( ));
20
21INSERT INTO sammy_test_clob
22
23 VALUES ( 2, 'BQP', EMPTY_CLOB( ));
24
25INSERT INTO sammy_test_clob
26
27 VALUES ( 3, 'BQA', EMPTY_CLOB( ));
28
29
30
31
32
33--读
34
35DECLARE
36
37 v_data VARCHAR2( 4000 );
38
39 v_show_data VARCHAR2( 5000 );
40
41BEGIN
42
43 SELECT invhl_read_clob_data( 'sammy_test_clob',
44
45 'mail_data',
46
47 'site = ''BQP''',
48
49 1 )
50
51 INTO v_data
52
53 FROM DUAL;
54
55
56
57 -- for v IN 1..length(v_data)/255 loop
58
59 --v_show_data := substr(v_data,0,255);
60
61 --v_data := substr(v_data,v*255);
62
63 v_show_data := TRIM( v_data );
64
65 DBMS_OUTPUT.put_line( v_show_data );
66
67 --end loop;
68
69 -- DBMS_OUTPUT.put_line( v_show_data );
70
71END;
72
73
74
75--写
76
77CALL invhl_update_clob_data('sammy_test_clob','mail_data','site = ''BQP''',0,'BVBVBVBV')
78
2
3
4
5ID NUMBER,
6
7site VARCHAR2(4000),
8
9mail_data CLOB
10
11
12
13)
14
15
16
17INSERT INTO sammy_test_clob
18
19 VALUES ( 1, 'BQA', EMPTY_CLOB( ));
20
21INSERT INTO sammy_test_clob
22
23 VALUES ( 2, 'BQP', EMPTY_CLOB( ));
24
25INSERT INTO sammy_test_clob
26
27 VALUES ( 3, 'BQA', EMPTY_CLOB( ));
28
29
30
31
32
33--读
34
35DECLARE
36
37 v_data VARCHAR2( 4000 );
38
39 v_show_data VARCHAR2( 5000 );
40
41BEGIN
42
43 SELECT invhl_read_clob_data( 'sammy_test_clob',
44
45 'mail_data',
46
47 'site = ''BQP''',
48
49 1 )
50
51 INTO v_data
52
53 FROM DUAL;
54
55
56
57 -- for v IN 1..length(v_data)/255 loop
58
59 --v_show_data := substr(v_data,0,255);
60
61 --v_data := substr(v_data,v*255);
62
63 v_show_data := TRIM( v_data );
64
65 DBMS_OUTPUT.put_line( v_show_data );
66
67 --end loop;
68
69 -- DBMS_OUTPUT.put_line( v_show_data );
70
71END;
72
73
74
75--写
76
77CALL invhl_update_clob_data('sammy_test_clob','mail_data','site = ''BQP''',0,'BVBVBVBV')
78