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

Bug: Structure Synchr. Disregards Field Order!

forums forums SQLyog SQLyog: Bugs / Feature Requests Bug: Structure Synchr. Disregards Field Order!

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #19542
      motin
      Member

      For help fixing this, this is how to alter field-orders:

      To reorder the columns of your table, you can use the ALTER TABLE syntax, since as of MySQL 4.0.1, the keywords FIRST and AFTER can be used in a CHANGE or MODIFY command.

      Example:

      mysql> describe example_table;

      Code:
      +————-+————+——+—–+———+—————-+
      | Field       | Type       | Null | Key | Default | Extra          |
      +————-+————+——+—–+———+—————-+
      | id          | int(11)    |      | PRI | NULL    | auto_increment |
      | columnA     | bigint(20) |      |     | 0       |                |
      | columnB     | text       |      |     | 0       |                |
      +————-+————+——+—–+———+—————-+

      3 rows in set (0.00 sec)

      mysql> ALTER TABLE example_table CHANGE COLUMN columnB columnB TEXT NOT NULL AFTER id;

      Query OK, 3 rows affected (0.01 sec)

      Records: 3 Duplicates: 0 Warnings: 0

      mysql> describe example_table;

      Code:
      +————-+————+——+—–+———+—————-+
      | Field       | Type       | Null | Key | Default | Extra          |
      +————-+————+——+—–+———+—————-+
      | id          | int(11)    |      | PRI | NULL    | auto_increment |
      | columnB     | text       |      |     | 0       |                |
      | columnA     | bigint(20) |      |     | 0       |                |
      +————-+————+——+—–+———+—————-+
    • #19543
      Ritesh
      Member
Viewing 1 reply thread
  • You must be logged in to reply to this topic.