Best practice on creating an ID column via database command


I am creating a project where I am loading transformed data into a database.

I would like to use the database command in EasyMorph to create the table and then add the data.

I would also like to have an ID column for each of my rows.

I have considered using the enumerate rows column but since this is going to be a regularly scheduled project, I am not sure this or creating a GUID is the best way to do it.

I reckon the best way would be to create some sort of autonumber field in SQL Server. However, I would rather not have to create each table manually in management studio.

Is there a way to create this kind of field when using the database command?



Hi Shaheed,

You can use the custom field definition mode as described here: Excel export to PostgreSQL with Primary key with key word AUTO_INCREMENT.

Thanks for your help. One follow up question. The example in the aforementioned post appears to show the keys already generated in EM. Would it work if I created a blank column and let SQL Server fill in the keys?

3 posts were split to a new topic: Updating database rows

I don’t see why it shouldn’t.