Tuesday, September 29, 2015

oracle 11g

creating a virtual column

We will begin by creating a simple table with a single virtual column, as follows.
SQL> CREATE TABLE t
  2  ( n1 INT
  3  , n2 INT
  4  , n3 INT GENERATED ALWAYS AS (n1 + n2) VIRTUAL
  5  );

Table created.

No comments:

Post a Comment