RE: identity

RE: identity

 

  

Hi,

Here is the syntax..

ALTER TABLE "Table name"
ALTER COLUMN "column name"
SET GENERATED ALWAYS AS IDENTITY (
START WITH 0
INCREMENT BY 0
NO MINVALUE
NO MAXVALUE
NO CYCLE
NO CACHE
NO ORDER
);

Note:
Any table can have only one identity column. If your table already has
one identity column then alter the table to drop that identity. After
that Alter the table to alter the column as identity.

To drop the identity the syntax is

ALTER TABLE "table name"
ALTER COLUMN "column name"
DROP IDENTITY
;

Regards,
Uma
-----Original Message-----
From: Joanna Grossman
[mailto:db2udbdba-ezmlmshield-x60059450.[Email address protected]
Sent: Wednesday, October 24, 2007 4:55 PM
To: LazyDBA Discussion
Subject: identity

Hi all -

Can I alter a column to be GENERATED ALWAYS AS IDENTITY? If so, could
someone give me a hand with the syntax?

TIA

--
joanna grossman
web & data manager
vermont monitoring coop
www.uvm.edu/vmc



---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


--
*** This message originates from COCC, Inc.

Under no circumstances should non-public customer information (NPCI) be transmitted via unsecured email. For your protection and that of your customer, member or end product consumer do not include account numbers, social security numbers, passwords or any other NPCI in email messages sent to COCC, Inc.

If the reader of this message, regardless of the address or routing, is not an intended recipient, you are hereby notified that you have received this transmittal in error and any review; use, distribution, dissemination or copying is strictly prohibited. If you have received this message in error, please delete this e-mail and all files transmitted with it from your system and immediately notify COCC, Inc. by sending reply e-mail to the sender of this message.

Thank you. ***


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