RowId Column

RowId Column

 

  

Hi

How to create a RowId column in a table. When I try to create the following
table, I am getting an error. I have seen this example in the net and
trying. I have also tried with an example from Craig S. Mullins book. Can
any one tell me the problem.

-------
CREATE TABLE EMP_RESUME
(
EMPNO CHAR(6) NOT NULL,
EMP_ROWID ROWID NOT NULL GENERATED ALWAYS,
EMPNAME CHAR(10),
PRIMARY KEY(EMPNO)
);
-------
------Error---
CREATE TABLE EMP_RESUME ( EMPNO CHAR(6) NOT NULL, EMP_ROWID ROWID NOT NULL
GENERATED ALWAYS, EMPNAME CHAR(10), PRIMARY KEY(EMPNO)) DB21034E The
command was processed as an SQL statement because it was not a valid
Command Line Processor command. During SQL processing it returned: SQL0104N
An unexpected token "GENERATED ALWAYS" was found following "ROWID ROWID NOT
NULL". Expected tokens may include: "<space>". SQLSTATE=42601
--------------

Thanks

Best Regards,
Varma Jampana


DB2 & UDB email list listserv db2-l LazyDBA home page