dbTalk Databases Forums  

MySQL WorkBench Questions...

comp.databases.mysql comp.databases.mysql


Discuss MySQL WorkBench Questions... in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SpreadTooThin
 
Posts: n/a

Default MySQL WorkBench Questions... - 12-15-2010 , 02:20 PM






I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one table to
another?

Feature Request?!

hmmmm maybe I can just copy the table and delete the columns i don't
need?

Reply With Quote
  #2  
Old   
J.O. Aho
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-15-2010 , 03:02 PM






SpreadTooThin wrote:
Quote:
I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one table to
another?

Feature Request?!

hmmmm maybe I can just copy the table and delete the columns i don't
need?
You can do that or "insert select" statement where you select the data from
the old table which you want to insert into the new one.

--

//Aho

Reply With Quote
  #3  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-15-2010 , 03:48 PM



On Dec 15, 2:02*pm, "J.O. Aho" <u... (AT) example (DOT) net> wrote:
Quote:
SpreadTooThin wrote:
I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one table to
another?

Feature Request?!

hmmmm *maybe I can just copy the table and delete the columns i don't
need?

You can do that or "insert select" statement where you select the data from
the old table which you want to insert into the new one.

--

* //Aho
I'm not sure we are on the same page here... are you talking about how
to do this in sql or are you saying that there is a way to do this in
MySQLWorkbench IDE?

Reply With Quote
  #4  
Old   
J.O. Aho
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-15-2010 , 08:20 PM



SpreadTooThin wrote:
Quote:
On Dec 15, 2:02 pm, "J.O. Aho" <u... (AT) example (DOT) net> wrote:
SpreadTooThin wrote:
I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one table to
another?

Feature Request?!

hmmmm maybe I can just copy the table and delete the columns i don't
need?

You can do that or "insert select" statement where you select the data from
the old table which you want to insert into the new one.
I'm not sure we are on the same page here... are you talking about how
to do this in sql or are you saying that there is a way to do this in
MySQLWorkbench IDE?

"insert select" is a sql query, which you would have to type your self, you
can execut it from mysql workbench as it has a "query browser"
(if your version lacks one, then it's high time to update to a new version).

--

//Aho

Reply With Quote
  #5  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-15-2010 , 09:30 PM



On Dec 15, 7:20*pm, "J.O. Aho" <u... (AT) example (DOT) net> wrote:
Quote:
SpreadTooThin wrote:
On Dec 15, 2:02 pm, "J.O. Aho" <u... (AT) example (DOT) net> wrote:
SpreadTooThin wrote:
I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one table to
another?

Feature Request?!

hmmmm *maybe I can just copy the table and delete the columns i don't
need?

You can do that or "insert select" statement where you select the datafrom
the old table which you want to insert into the new one.
I'm not sure we are on the same page here... are you talking about how
to do this in sql or are you saying that there is a way to do this in
MySQLWorkbench IDE?

"insert select" is a sql query, which you would have to type your self, you
can execut it from mysql workbench as it has a "query browser"
*(if your version lacks one, then it's high time to update to a new version).

--

* //Aho
How would that move a column from one table to another?

Reply With Quote
  #6  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-15-2010 , 09:46 PM



On 12/15/2010 10:30 PM, SpreadTooThin wrote:
Quote:
On Dec 15, 7:20 pm, "J.O. Aho"<u... (AT) example (DOT) net> wrote:
SpreadTooThin wrote:
On Dec 15, 2:02 pm, "J.O. Aho"<u... (AT) example (DOT) net> wrote:
SpreadTooThin wrote:
I have a table that I want to split into two or more tables...
Why can't I copy and past or drag and drop columns from one table to
another?

Feature Request?!

hmmmm maybe I can just copy the table and delete the columns i don't
need?

You can do that or "insert select" statement where you select the data from
the old table which you want to insert into the new one.
I'm not sure we are on the same page here... are you talking about how
to do this in sql or are you saying that there is a way to do this in
MySQLWorkbench IDE?

"insert select" is a sql query, which you would have to type your self, you
can execut it from mysql workbench as it has a "query browser"
(if your version lacks one, then it's high time to update to a new version).

--

//Aho

How would that move a column from one table to another?
You copy the information over and delete the original column.

If you're going to be a programmer, you need to learn to program. This
is basic SQL syntax, supported by every RDB. You can't expect GUI tools
to do everything for you.

And quite frankly, the number of times I've need to do this in 25 or so
years of SQL programming I can count on one hand. I don't think it's
worth a huge effort to put it in a GUI.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #7  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-15-2010 , 11:24 PM



Quote:
And quite frankly, the number of times I've need to do this in 25 or so
years of SQL programming I can count on one hand. * I don't think it's
worth a huge effort to put it in a GUI.
Graduated computer science 1982... You?

Reply With Quote
  #8  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-16-2010 , 06:29 AM



On 12/16/2010 12:24 AM, SpreadTooThin wrote:
Quote:
And quite frankly, the number of times I've need to do this in 25 or so
years of SQL programming I can count on one hand. I don't think it's
worth a huge effort to put it in a GUI.

Graduated computer science 1982... You?
Long before that. Just started using SQL around 1985 at IBM.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #9  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-16-2010 , 10:50 AM



Quote:
Graduated computer science 1982... You?

Long before that. *Just started using SQL around 1985 at IBM.

Cool.. It's good to see some ol hands here.
I just started using SQL recently but did a lot of database programing
with dBASE I & II by Ashton Tate...
gave up database programing to do simulations and real time
communications etc...


I hope I phrased the question properly.
You do realize I am simply trying to modify the schema of my
database?.
I had one table that needed to be split into many tables
Copy and Pasting columns (fields) from the large table to the other
smaller tables is impossible in the IDE,
but would have been very helpful.

Thanks.
B.

Reply With Quote
  #10  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: MySQL WorkBench Questions... - 12-16-2010 , 03:01 PM



On 12/16/2010 11:50 AM, SpreadTooThin wrote:
Quote:
Graduated computer science 1982... You?

Long before that. Just started using SQL around 1985 at IBM.


Cool.. It's good to see some ol hands here.
I just started using SQL recently but did a lot of database programing
with dBASE I& II by Ashton Tate...
gave up database programing to do simulations and real time
communications etc...


I hope I phrased the question properly.
You do realize I am simply trying to modify the schema of my
database?.
I had one table that needed to be split into many tables
Copy and Pasting columns (fields) from the large table to the other
smaller tables is impossible in the IDE,
but would have been very helpful.

Thanks.
B.
Yes, I understand.

Of course, if the database design is perfect and requirements never
change, we never have to split tables. And course, we always design
perfect databases

Seriously, though. I've very seldom had to just split tables like this.
More often than not, when I do have to split columns of a table, there
will be additional tables involved and I have to make links between
multiple tables. And when happens, it's a bit more complicated, having
to create link tables, etc.

Nevertheless, J.O. is correct - it's pretty easy to do with an INSERT
.... SELECT statement. You still need to create the additional table then
later modify the current one to drop the columns, but is pretty easy and
straightforward.

But this also isn't DBase I/II; it's a lot more complicated (and
reliable). The GUIs will help you with a lot of stuff, but it won't do
it all.

I don't know any GUI for any serious database which will do this;
perhaps it's out there but I haven't seen it. As I said - it's just not
something you do every day, and when you do, it's pretty simple.

One other thought would be to create a new table identical to the
original (including data), then just drop the columns you don't need
from each table. But if you have a lot of data in the table, this might
not be workable.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.