|
Charles:
Works fine for me. Tested on V5R3
I tried the following per your statements. (Added the constraint as a
secondary step but that should not matter.
CREATE TABLE MyLIB.HPDOCU ( DHDOID INTEGER GENERATED ALWAYS AS
IDENTITY ( START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE NO
CYCLE NO ORDER CACHE 20 ), DHCSCD CHAR(3) CCSID 37 NOT NULL DEFAULT
'' , DHBRCH CHAR(13) CCSID 37 NOT NULL DEFAULT '' );
alter table MyLIB.HPDOCU add CONSTRAINT MyLIB.QSYS_HRDOCU_00001 PRIMARY
KEY( DHDOID ) ;
insert into MyLIB.hpdocu (DHCSCD, DHBRCH) values('AAA', 'TestAAA');
insert into MyLIB.hpdocu (DHCSCD, DHBRCH) values('BBB', 'TestBBB');
insert into MyLIB.hpdocu (DHCSCD, DHBRCH) values('CCC', 'TestCCC');
Select * from MyLIB.hpdocu:
1 AAA TestAAA
2 BBB TestBBB
3 CCC TestCCC
David Smith
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.