Unix Technical Forum

Comparing structural differences between tables

This is a discussion on Comparing structural differences between tables within the MySQL forums, part of the Database Server Software category; --> I have many similar tables to combine into one, for a report. Does any one know of a method ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 09:32 PM
Jim Britain
 
Posts: n/a
Default Comparing structural differences between tables

I have many similar tables to combine into one, for a report.

Does any one know of a method I could use to compare structural
differences between tables?

Currently I copy the table, truncate the copy, and print it out, and
then examine the differences on paper, but this becomes tedious for
doing more than a couple tables, and is prone to error.

There has to be a better way.

Jim



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 09:32 PM
Luuk
 
Posts: n/a
Default Re: Comparing structural differences between tables

Jim Britain schreef:
> I have many similar tables to combine into one, for a report.
>
> Does any one know of a method I could use to compare structural
> differences between tables?
>
> Currently I copy the table, truncate the copy, and print it out, and
> then examine the differences on paper, but this becomes tedious for
> doing more than a couple tables, and is prone to error.
>
> There has to be a better way.
>
> Jim
>
>
>


give us, i.e. from two tables you like to compare the output of

SHOW COLUMNS FROM table1;

and maybe even a SELECT * from table1 LIMIT 5;
to know what you think is 'similar'

and give an example on how you want to 'combine' these other than using
a UNION function (http://dev.mysql.com/doc/refman/5.0/en/union.html)


--
Luuk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 09:32 PM
Ana C. Dent
 
Posts: n/a
Default Re: Comparing structural differences between tables

Jim Britain <nomail2me@suddenlink.net> wrote in
news:bg5004pi3b77hrrvbaiv7bcstrlukpevml@4ax.com:

>
> There has to be a better way.
>


http://schemacrawler.sourceforge.net/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-15-2008, 09:32 PM
Jim Britain
 
Posts: n/a
Default Re: Comparing structural differences between tables

On Sat, 12 Apr 2008 16:21:42 GMT, "Ana C. Dent"
<anacedent@hotmail.com> wrote:

>Jim Britain <nomail2me@suddenlink.net> wrote in
>news:bg5004pi3b77hrrvbaiv7bcstrlukpevml@4ax.com :
>
>>
>> There has to be a better way.
>>

>
>http://schemacrawler.sourceforge.net/


Exactly what I was looking for, in particular the diffs.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-15-2008, 09:32 PM
Axel Schwenke
 
Posts: n/a
Default Re: Comparing structural differences between tables

Jim Britain <nomail2me@suddenlink.net> wrote:
>
> Does any one know of a method I could use to compare structural
> differences between tables?


<canonical answer>
http://www.google.com/search?q=mysql+diff
</canonical answer>


XL
--
Axel Schwenke, Support Engineer, MySQL AB

Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
MySQL User Forums: http://forums.mysql.com/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-15-2008, 09:32 PM
Jim Britain
 
Posts: n/a
Default Re: Comparing structural differences between tables

On Sat, 12 Apr 2008 19:48:55 +0200, Axel Schwenke
<axel.schwenke@gmx.de> wrote:

>Jim Britain <nomail2me@suddenlink.net> wrote:
>>
>> Does any one know of a method I could use to compare structural
>> differences between tables?

>
><canonical answer>
>http://www.google.com/search?q=mysql+diff


Why didn't I think of that?? Too deep into the project, I guess.
There's a tradeoff between research and getting a tedious project
done. Boring & tedious leads to research...

Thanks -- I needed that..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:49 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com