CREATE TABLE EMP_RESUME
(
EMPNO CHAR(6) NOT NULL,
EMP_ROWID ROWID NOT NULL GENERATED BY DEFAULT,
EMPNAME CHAR(10),
PRIMARY KEY(EMPNO)
);
-----Original Message-----
From: Varma Jampana
[mailto:db2udbdba-ezmlmshield-x83069883.[Email address protected]
Sent: Monday, November 29, 2004 2:17 PM
To: LazyDBA Discussion
Subject: 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
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page