Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 109 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
INDEX on RAW data type

728256
Member Posts: 79
Hi,
I read this from a web site. Please let me know fi thsi is correct.
The raw datatype is used to store binary data or binary strings. The maximum size for a raw in a table is 2000 bytes. Within a PL/SQL piece of code, the maximum size is 32767 bytes. The raw datatype is similar to the varchar2. However, Oracle does not interprete the data stored within a raw when applying character set conversion.
If the above is correct them, What happens when I create Index on this column. We have table with Primary key on Raw column. Is this acceptable or a wrong way of creating the table.
Please explain in detail if possible or direct me to a book or URL where I can find the information.
Thanking you
Rocky
I read this from a web site. Please let me know fi thsi is correct.
The raw datatype is used to store binary data or binary strings. The maximum size for a raw in a table is 2000 bytes. Within a PL/SQL piece of code, the maximum size is 32767 bytes. The raw datatype is similar to the varchar2. However, Oracle does not interprete the data stored within a raw when applying character set conversion.
If the above is correct them, What happens when I create Index on this column. We have table with Primary key on Raw column. Is this acceptable or a wrong way of creating the table.
Please explain in detail if possible or direct me to a book or URL where I can find the information.
Thanking you
Rocky
Answers
-
In general, RAW columns can be indexed but LONG RAW cannot.
See SQL Reference CREATE INDEX section http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5011.htm#i2182635
>
Restriction on Index Columns
You cannot create an index on columns or attributes whose type is user-defined, LONG, LONG RAW, LOB, or REF, except that Oracle Database supports an index on REF type columns or attributes that have been defined with a SCOPE clause.
>
Documentation on SQL data types can be found in SQL Reference http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i54330.
Document on PL/SQL data types can be found in PL/SQL User's Guide and Reference: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/datatypes.htm#i10924
Please post your 4 digits Oracle version.
Edited by: P. Forstmann on 3 févr. 2010 23:16
This discussion has been closed.