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

Term: VALUE

Definition:
In Oracle PL/SQL, the VALUE function is used in Oracle's object architecture to fetch an object instance of the table column, which corresponds to the current row in the table.

Example Syntax:

VALUE(object column)


Example Usage:

The example code below creates an object table and queries its instances using VALUE function.

SQL> CREATE TYPE TEST_TYP AS OBJECT
(ID NUMBER, NAME VARCHAR2(100);
Type created.

SQL> CREATE TABLE TAB_TYPE OF TEST_TYP;
Table created.

SQL> INSERT INTO TAB_TYPE VALUES (TEST_TYP(1,'AAA'));
1 row created.

SQL> INSERT INTO TAB_TYPE VALUES (TEST_TYP(2, 'BBBB'));
1 row created.

SQL> SELECT VALUE(T) FROM TAB_TYPE T;

VALUE(T)(ID, NAME)
---------------------------
TEST_TYP(1, 'AAA')
TEST_TYP(2, 'BBBB')


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