Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL RAW Datatype      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: RAW

Definition:
In Oracle PL/SQL, RAW is a data type used to store binary data, or data which is byte oriented (for example, graphics or audio files). One of the most important things to note about RAW data is that it can only be queried or inserted; RAW data cannot be manipulated. RAW data is always returned as a hexadecimal character value. In SQL, its maximum size is 2000 bytes, while in PL/SQL it is 32767.

Example Syntax:

VARIABLE RAW(precision)


Example Usage:

CREATE TABLE T_RAW 
(ID NUMBER,
HEX_CODE RAW(16)
);

INSERT INTO T_RAW
VALUES (1, SYS_GUID());

INSERT INTO T_RAW
VALUES (2, SYS_GUID());

SQL> SELECT * FROM T_RAW;

ID HEX_CODE
---------- --------------------------------
1 9CA181F1F7E94D1EADBFC270C8BC53EB
2 08FC133785A6412CABF5A130201FBEE1


Related Links:

Related Code Snippets:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 303 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?