English 中文(简体)
PL/SQL在Oracle插入历史长篇的字句
原标题:PL/SQL to insert history row with long raw column in Oracle

我在甲骨文表中有一个很长的原始栏。 加上某些字句,是因为我选择发言中还有很长的原始栏目。 基本上,我试图插入历史发展加上一些参数的变化。 因此,我想用PL/SQL作为Oracle。 我在民族解放党/民族解放军中没有任何经验,在几天后,我也没有任何经历。 谁能帮助我了解一下PL/Q号文件,来回答我的问题? advance!

问题回答

LONG和LONG RAW数据类型已经折旧,并且已经多年了。 确实,你们离去更远。

她说,如果你重新使用PL/SQL,你将限于32,760英特数据,这是LONG RAW PL/SQL数据类型将持有的最大数据。 然而,LONG RAW数据库数据类型最多可维持2GB的数据。 因此,如果在表格中包含超过32 760英特的数据any,你将<>not能够用PL/SQL检索。 这是LONG和LONG RAW数据类型的根本限制,Oracle解释其用途的原因之一。

在这种情况下,唯一的选择是Pro*C或OCI。

More information can be found here: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/datatypes.htm#CJAEGDEB

希望会有所帮助。

如果你的数据限于32kB,你可以直接与PL/SQL的一个LONG RAW栏合作:

FOR cc IN (SELECT col1, col2... col_raw FROM your_table) LOOP
   INSERT INTO your_other_table (col1, col2... col_raw) 
      VALUES (cc.col1, cc.col2... cc.col_raw);
END LOOP;

如果任何LONG RAW大于32k,这将失败。

在这种情况下,你必须使用另一种语言。 你们可以使用java,因为它被纳入了亚洲开发银行。 我已经回答了几个关于SO和LONG RAW和java的问题:

不管怎样,正如你注意到的那样,与这种数据类型合作是一种痛苦。 如果不可能转换为LOB,那么你就不得不进行工作。





相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

How to make a one to one left outer join?

I was wondering, is there a way to make a kind of one to one left outer join: I need a join that matches say table A with table B, for each record on table A it must search for its pair on table B, ...

Insert if not exists Oracle

I need to be able to run an Oracle query which goes to insert a number of rows, but it also checks to see if a primary key exists and if it does, then it skips that insert. Something like: INSERT ALL ...

How can I store NULLs in NOT NULL field?

I just came across NULL values in NOT-NULL fields in our test database. How could they get there? I know that NOT-NULL constraints can be altered with NOVALIDATE clause, but that would change table s ...

Type reference scope

I m studying databases and am currently working on a object-relational DB project and I ve encountered a small problem with the number of possible constraints in an object table. I m using "Database ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...

热门标签