DB2 AS400
Utilisation des séquences sur DB2 400 avec v5r3
(Nouveauté de la v5r3)
1) Création:
CREATE SEQUENCE TEST.ORDER_SEQ
START WITH 500
INCREMENT BY 1
MAXVALUE 1000
CYCLE
CACHE 24
2) Pour l'utiliser dans un SELECT:
SELECT NEXT VALUE FOR TEST.ORDER_SEQ FROM SYSIBM.SYSDUMMY1
3) Pour l'utiliser dans un INSERT:
INSERT INTO ORDERS (ORDERNO, CUSTNO)
VALUES (NEXT VALUE FOR TEST.ORDER_SEQ, 12)
Tags: -
Related entries:
Auteur: Michel Preti
Révision: 1.0
Vous ne pouvez pas commenter cet enregistrement
Commenté par HmfyqIKl:
We would like to thank you yet again for the beautiful ideas you gave Jesse when ppirareng a post-graduate research and also, most importantly, with regard to providing each of your ideas in one particular weblog post. If we had recognized of the web-site a year ago, we would have been rescued from the pointless measures we were selecting. Thank you pretty much.
Added at: 2015-12-21 09:19
Commenté par 0ALnLNJ81:
I have been browsing oinlne more than 3 hours today, but I by no means discovered any attention-grabbing article like yours. It is lovely worth enough for me. In my view, if all website owners and bloggers made good content as you did, the web will be a lot more useful than ever before.
Added at: 2015-12-22 19:19