Is it possible to create a field in Data Extension in ET/SFMC which is auto-incremented as the values are added to it?

  • ET means exact target tool where we create data extensions.
    – Madan
    Jan 19, 2016 at 12:56

3 Answers 3


There is a hidden auto-increment field _CustomObjectKey. I don't understand there are so many hidden things from document, that is very hard for partners and developers. Also if you use AMPscript, GUID() might help.


Unfortunately, there's no such datatype in SFMC.

  • how can we solve the purpose then. My requirement is if new values are added, the id field should be automatically get incremented and added along with the other values and the field will act as a primary key for that data extension.
    – Madan
    Jan 20, 2016 at 19:22
  • There's a unique _CustomObjectKey for every row in a Data Extension, but it's not visible nor can it be part of the primary key. It is accessible via Query Activity. Either you'll need to set the auto-increment key in advance or choose another column to use as a Primary Key. Jan 20, 2016 at 19:32

I've used one solution for this. Copied from one Data extension to another data extension. There I have used like:

Select *,  _CustomObjectKey as ID from Dataextension1 

This is working fine for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .