|
-
To convert to a LOB do this:
SQL> create table a (id NUMBER(10), description long);
Table created.
SQL> insert into a values (1,'one');
1 row created.
SQL> create table b (id NUMBER(10), description clob);
Table created.
SQL> insert into b select id, to_lob(description) from a;
1 row created.
SQL>
To create a copy of a table with a LONG in it do this:
SQL> create table a (id NUMBER(10), description long);
Table created.
SQL> insert into a values (1,'one');
1 row created.
SQL> create table b (id NUMBER(10), description long);
Table created.
SQL> DECLARE
2 CURSOR c_data IS
3 SELECT * FROM a;
4 BEGIN
5 FOR cur_rec IN c_data LOOP
6 INSERT INTO b (id, description)
7 VALUES (cur_rec.id, cur_rec.description);
8 END LOOP;
9 END;
10 /
PL/SQL procedure successfully completed.
SQL> select count(*) from b;
COUNT(*)
----------
1
SQL>
Cheers
[Edited by TimHall on 08-20-2002 at 09:40 AM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|