Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Copy Table/Data – Drops Auto Increment

forums forums SQLyog SQLyog: Bugs / Feature Requests Copy Table/Data – Drops Auto Increment

  • This topic is empty.
Viewing 0 reply threads
  • Author
    Posts
    • #13908
      CalEvans
      Member

      Let me restate the problem to make sure I understand it. (Good chance I don't!) 🙂

      You copied a table structure over to a new table.

      The original table had an autoincrement field and the next value was not 0.

      The new table had an autoincrement field but the next value was 0.

      If this is correct then the problem is a misunderstanding. What SQLyog does when you copy a table structure only is it creates the new CREATE TABLE DDL and then executes it, just as if you had done it by hand only giving the table a new name. Thus the autoincrement value *SHOULD* be 0. (NOTE: This wouldn't happen if you copied the data also simply because it would have issued the appropriate number of INSERT's.)

      So, the program is actually doing what it's supposed to do. A question for the developers is do you feel it is appropriate to add an option into the COPY TABLE that would automatically set the next autoincrement value? (There is a command for it but I forget it at the moment.)

      IMHO, no. But that's just me.

      HTH,

      =C=

Viewing 0 reply threads
  • You must be logged in to reply to this topic.