Sequel-ace: Copy as SQL insert without primairy keys

Created on 10 Jul 2020  路  11Comments  路  Source: Sequel-Ace/Sequel-Ace

Currently there is an option "Copy as SQL insert" in the contents view of a table.

I really would like to see the option "Copy as SQL insert without primairy keys" added.

There are many cases that I need to copy rows from 1 database to another, which are similar structure, but with different data and different primairy keys. In the current application I have to manually remove all the primairy key data before I can run the Insert command.

Enhancement PR Welcome

Most helpful comment

Something like this?

2020-07-11 23 46 14

All 11 comments

I am wondering, would this be skipping all primary key values or only those that are auto-increment? I do see the use for skipping auto-increments (and had this need in the past myself a couple of times) but for other types of keys I am wondering.

I meant the auto-increment keys only

so, if a non AUTO_INCREMENT column is say a UNIQUE KEY, then you would still want to copy that?

And would you want this to be a global option in prefs or an extra menu item/right click option?

Screenshot 2020-07-11 at 10 26 11 PM

Screenshot 2020-07-11 at 10 25 40 PM

Only auto increment, the rest of the data should be copied as is.

An extra menu item/right click would be most useful here

Something like this?

2020-07-11 23 46 14

Wow, this is the perfect solution! Good job!

@Sequel-Ace/all You ok with this? The menu item name ok?

Screenshot 2020-07-14 at 7 39 35 PM
Screenshot 2020-07-14 at 7 40 07 PM

@Sequel-Ace/all You ok with this? The menu item name ok?

I'm okay with it! Go ahead and PR
I don't love the ctrl+shift+c keystroke but honestly can't think of a better one! Maybe shift+alt+cmd+c instead?

shift+alt+cmd+c does something weird. OK with shift+control+command+c?

shift+alt+cmd+c does something weird. OK with shift+control+command+c?

Yup! Works for me!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robertoschwald picture robertoschwald  路  4Comments

vuon9 picture vuon9  路  4Comments

blakeyman picture blakeyman  路  5Comments

categoryshell picture categoryshell  路  5Comments

stychos picture stychos  路  6Comments