How do I, using Heidi, define a field as a primary key after the table has already been created.
Thanks
Dan Landis
defining primary key after table creation
right click any of the column-names and choose the option 'manage indexes'
see also:
http://www.heidisql.com/forum/viewtopic.php?t=228
see also:
http://www.heidisql.com/forum/viewtopic.php?t=228
just remember, that the primary-key is unique. so when you want to add this key, the data in this row has to be unique.
gives you all your dups.
the primary-key has nothing to do with the auto-increment. but you can only set the auto-increment to an primary-column. so first, add the new column, then change/add the primary key to this column and then edit the column and set the auto-increment.
select id, count(*) from table group by id having count(*) <> 1
gives you all your dups.
the primary-key has nothing to do with the auto-increment. but you can only set the auto-increment to an primary-column. so first, add the new column, then change/add the primary key to this column and then edit the column and set the auto-increment.
Please login to leave a reply, or register at first.