Storage types are classified as follows: ① character type: CLOB: large volumes of single-byte character data are stored. NLOB: stores fixed-width, multi-byte character data. ② Binary type: BLOB: stores large unstructured binary data. ③ Binary file type: BFILE: stores binary files in operating system files outside the database. Path for storing files.
2. Classified by storage method: ① stored in the internal tablespace:
the type of data stored: ① character type: CLOB: Stores large amounts of single-byte character data. Nlob: Stores fixed-width multibyte character data. ② binary type: BLOB: Stores large unstructured binary data. ③ binary file type: BFILE: Stores the binaries in the operating system files outside the database. The file path is stored.2, by storage: ① stored in the internal tablespace: Clob,nlob and Blob② po
I have used ORACLE9i, oracle8 for a long time. I wrote out the issues that need attention in JSP for your reference only.I. How to deal with large types of Clob and BLOBCLOB can be used to store enlarged text data and store up to 4 GB of data, which is common in application development. SQL provided by java. corresponding to the Clob class. it provides two methods to read
The database provides two field types: blob and clob, which are used to store large strings or binary data (slices ).
Blob is stored in a single byte and is suitable for storing binary data and files.Clob uses multi-byte storage and is suitable for storing large text data.
The processing of Blob/clob fields in Oracle is quite special, so pay special attention to the following two points:
1. Use the Stream M
It is mainly used to store database fields with a large amount of data. It can store up to 4 GB of unstructured data. This section describes how to store LOB data of character type and binary file type separately.
It is mainly used to store database fields with a large amount of data. It can store up to 4 GB of unstructured data. This section describes how to store LOB data of character type and binary file type separately.
3. Reading and operating big object data: DBMS_LOB packageDBMS_LOB p
statement looks at the type correspondence of the SQL Oracle, and the second table shows the type correspondence of each database system in more detail. Based on the first table and the field types in our SQL Server, we can build our Oracle tables.
SQL Server and Oracle correspondence
Oracle bigint number 3 1 Oracle binary BLOB NULL 0 1 Oracle Binary RAW-1 4 1 Oracle bit NUMB ER 1 3 1 Oracle char CHAR-1 4 1 Oracle char CLOB NULL 0 1 Oracle Char
Summary: There are two ways to convert the varchar2 of a field to the lob type.
Method 1: Put the data in the varchar2 column into the middle column by means of the temporary intermediate column, clear the varchar2 column, convert it to the long type, and then convert it from the Long type to the clob type, put the data in the middle column in The clob column and delete the temporary middle column;
The sec
In the oracle development environment, we can use the dbms_lob package for processing! Dbms_lob package is powerful and simple to use. It can be used to read internal lob objects or to process B
In the oracle development environment, we can use the dbms_lob package for processing! Dbms_lob package is powerful and simple to use. It can be used to read internal lob objects or to process B
The ORA-06502: PL/SQL: Number or value error: string buffer is too small when a stored procedure is found
What is lob?
Lob is a big object data type of the Oracle database. It can store strings of more than bytes, binary data, OS files, and other large object information. the maximum storage capacity. The root Oracle version depends on the size of the Oracle block.
Which lob types are available?
Currently, Oracle provides four lob types: clob, nclob, blob, and bfile. clob and nlob are big strings, and nlob is a
There are three types of lob:
Blob:binary Large Object Binary Large ObjectsClob:character Large Object single character large objectsDouble-byte Character Large Object Double Byte character large objectsLarge data types in Oracle:Long: variable-length string data, the longest 2g,long has an attribute of VARCHAR2 column, can store long text, a table with up to one long columnLong RAW: variable Long binary data, up to 2G
CLOB: Character large object
The original question link:
Http://www.eygle.com/special/NLS_CHARACTER_SET_07.htm
As we mentioned earlier, changing the character set by modifying the props$ is an extremely dangerous way to Oracle7, and should be avoided as much as possible.
We also know that changing the character set through alter DATABASE CHARACTER set is safe and reliable, but with strict subsets and superset constraints, we rarely can actually
Use this method.
There is actually another way for Oracle to change the cha
with a search under D:\oracle\product\11.2.0\dbhome_1\sqlplus\admin. Then open this file,Get:----Copyright (c) 1988, 2005, Oracle. All rights Reserved.----NAME--Glogin.sql----DESCRIPTION--Sql*plus Global Login "site profile" file----Add Any sql*plus commands here, is to is executed when a--User starts Sql*plus, or uses the Sql*plus CONNECT command.Set Linesize 300;Set pagesize 100;For more detailed information, see: http://blog.csdn.net/kkdelta/article/details/7178890 4. Discussions between
this method to create one.
// Empty LOB operator, and then operate on the operator. EMPTY_BLOB () function is a needle
// For BLOB type, which corresponds to CLOB is EMPTY_CLOB (). Second,
// Returns picture so that php oci functions can process it.
$ Stmt = OCIParse ($ conn, "insert into pictures (id, imgtype, description, picture) VALUES
(PIC_SEQ.NEXTVAL, '$ imgtype', '$ description',' $ lob_upload_type ', EMPTY_BLOB () RETURNING picture
INTO: PI
, and a new Parametermetadata interface can describe the types and attributes of the parameters in the PreparedStatement object.
2 named parameters in CallablestatementsBefore JDBC 3.0, set a parameter in a stored procedure to specify its index value, not its name. The CallableStatement interface has been updated and you can now specify the parameters by name.
3 Changes in data typesThe data types supported by JDBC have made several changes, one of which is the addition of two new data typ
js| Beginner | Process A JSP beginner's learning process (vii)
Theunforgiven
Seventh chapter Ultra-long text operation--CLOB type data access
Back to the time I wrote the message board, when to store the text of the message board, found that VARCHAR2 () (variable length of the string) can only save 4000 bytes, that is, 2000 Chinese characters, this is too little ah, check the database type of data, found that there are so many types: LONG, 2G (if
Data type
Integer (int)Boolean Type (Boolean)Micro Integer (TINYINT)Small Integer (SMALLINT)large Integer (BIGINT)identifier (IDENTITY)Number of currencies (decimal)
Span style= "text-decoration:underline;" > Real (real) time date (date) binary (binary)
Variable string (VARCHAR)Case insensitive variable string (varchar_ignorecase)character (CHAR)Binary Large object (BLOB)text Large object (
SQL queries the nclob field of oracle, sql1_lenclob
Use the CONTAINS keyword to query the NCLOB Field
SELECTFORMATTED_MESSAGEFROMFOC. TBL_LOGWHERECONTAINS (FORMATTED_MESSAGE, p_FORMATTED_MESSAGE)> 0;
Oracle clob field insertion
In oracle, four lobs types are available: blob, clob, bfile, and nclob.The following is a brief introduction to the lob data type.Blob: Binary lob, Which is binary data. It can be u
stored in a blob
CREATE TABLE PICTURES (
ID number,
Imgtype, VARCHAR2 (60),
DESCRIPTION VARCHAR2 (100),
Picture BLOB
);
If you want to implement an automatic increment of the ID, build another sequence:
CREATE SEQUENCE Pic_seq;
PHP Program-Insert Section:
$conn =ocilogon ($username, $password, $sid);
Here are two points to note: one is to use the Empty_blob () function. This is an internal letter from Oracle
Number that returns a locator for the lob. When inserting lobs, you can only use this
JAVA notes: Java Database Programming (4): Processing Big Data Objects, java Database Programming
Big Data Objects refer to two types of fields: CLOB and BLOB. CLOB can store massive volumes of text, such as a novel. Binary files, such as movies and images, can be stored in BLOB. To process large data objects in a program, you must use PreparedStatement, all content must be saved and read from the large fie
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.