Get table diff with sqlyog
As the job area getting bigger and bigger, new tables created and others table get normalize. It’s often to see adding field or remove some field from table.
Development phase also take some place and different computer. Need more time to get ‘whats new‘ in table structure.
An illustration for example :
Working to make database for book application. Location for developing are in the office and house. This example will show how to get table diff for table at home versus office table.
Database test1 (at office) already have table named ‘book‘.
Structure of this table contains :
id (Int 11), auto increment
book_name (varchar 100)
book_author (varchar 100)
I dump this structure for my computer at home. At home I made database test2.
I add a few field in this table, at the end I came up with this table structure :
before I know sqlyog I manually write down every field I add or remove. When the table increase in quality and quantity I can’t use manual way.
I Need table diff.
To get table diff in sqlyog for this example , here’s the steps :
1. Make new database ( in computer office )
2. Dump newest structure ( made at home ) to database created in step 1.
3. Open Sqlyog to start make diff.
click Connect.
Make sure database test1 and test2 exist.
Click on ‘Powertools‘ -> Structure Synchronization Tool
Selection of database for first host and second host is depend on requirement, in this case I use database test2 as first host and database test1 as second host because database test2 contain table with newer structure. Your case is vary.
Hit Compare Now button to get start.
Click ‘Sync (File)… >>" button to save table diff . I save it to My Document.
Double click diff file to see its content.
/* Alter table in Second database */
alter table `test1`.`book`,
add column `book_review` text NULL after `book_author`,
add column `book_isbn` varchar(25) NULL after `book_review`,
add column `book_price` decimal(5,2) NULL after `book_isbn`;
This sql query is exactly what I need, Just copy and paste this sql to phpmyadmin SQL window section then my work at home get synchronized.
Very neat tool.
SqlYog Highly recommended
- sqlyog diff
- tablediff example
- sqlyog compare tables
- how to make database in sql yog
- sqlyog learning tips
- addColumn magento
- sqlyog learning
- sqlyog dump table
- sqlyog create a diff dump
- sqlyog mysql diff
- sqlyog to diff
- sqlyog tutorial to write query
- tablediff
- tablediff -et
- tablediff cannot connect to database
- tablediff column null error
- tablediff mysql
- tablediff sql
- sqlyog compare table structure
- sqlyog compare table
- clipshare Pro 4 1 Import the database /sql/clipshare sql with phpmyadmin
- coupon code sqlyog
- how to add a column in a table in sqlyog
- how to create a table in sqlyog
- how to find table location in sqlyog
- how to get database diff
- how to make coding in sql yog server to make a table for make a database
- learning sqlyog
- location sqlylog
- magento addcolumn number decimal
- need tablediff
- normalization with sql yog
- normalize a table with sql yog
- sql tablediff sync tables databases
- sql yog cant copy database to diferenet host
- sqlyog add field
- tablediff structure






No Comment
Random Post
Leave Your Comments Below