Copy tables from the data source-Column Mappings And Transformations

The button Map opens the Column Mappings and Transformations Dialog as shown in below:

By default SQLyog will map all the columns from the source table. If you do not want to import a column, uncheck the box to the left from its name.

Using the Column Mappings and Transformations dialog you can change the properties of target fields that will be imported in MySQL. For example, you can:

  • Define a different name for the column in the grid field Destination.
  • Set the destination column Type, Length and Default value.
  • Indicate that the column is a Primary one.
  • Indicate that the column is a Binary one. This attribute can be used for character field types (like CHAR, VARCHAR, TEXT, etc.) to cause binary collation for the column character set.
  • Indicate that the column is a Not Null one.
  • Indicate that the column contains Unsigned numbers.
  • Indicate that the column contains Auto Increment values (for integer columns). When you insert a value of NULL or 0 into an indexed AUTO INCREMENT column, the column is set to the next sequence value.
  • Indicate that the column contains Zero filled values to have the default padding of spaces replaced with zeros. For example, if a column is declared as INT(5) ZEROFILL, a value of 1 will be retrieved from this column as 00001.

Note that some essential properties set for the fields in the source tables cannot be overridden during an import session.

The button Edit SQL over the columns list opens the window where you can manually edit the CREATE TABLE statement. The button Clear defaults clears the default values of all the columns that have been checked for import in a particular table. This option becomes useful in the case where some ODBC-source defaults do not work with MySQL.

Note: Once you have modified the query manually, the CREATE TABLE statement will be used to create the table irrespective of the column mapping done in the previous dialog. To cancel the changes in the CREATE TABLE statement, just click the Re-Generate button.

Note:This feature is available in SQLyog Enterprise and Ultimate.

Still need help? Contact Us Contact Us