![]() | |
#21
| |||
| |||
|
|
On 12/17/2010 12:57 PM, SpreadTooThin wrote: On Dec 17, 1:02 pm, John Nagle<na... (AT) animats (DOT) com> *wrote: On 12/15/2010 12:20 PM, SpreadTooThin wrote: I'm not moving data! *I'm modifying the database structure! *The database isn't populated! * * Oh. *If you had written that in your original message, you would have received a useful answer by now. * * Execute the SQL statement * * * * SHOW CREATE TABLE oldtablename; This will display the CREATE TABLE statement needed to create that table. *You can then edit the text of the CREATE TABLE statement and use it to create a new table. * * * * * * * * * * * * * * * * John Nagle |

#22
| |||
| |||
|
|
On 12/17/2010 2:53 PM, SpreadTooThin wrote: going back to my db programming days... The structure of the database can be stored in a table. then you can simply edit the table using standard 'sql' commands. Is this what you are referring to? How would you export the structure of the table to a table? No, you don't typically export to a table - you export the SQL commands to a flat file, then edit that flat file. *This is true pretty much all of the SQL databases out there. MySQL does store the structure of the database in its internal tables - but you really don't want to muck with that unless you want to destroy your database (there is a direct correlation between the internal tables and the structure of the data file(s). *Seehttp://dev.mysql.com/doc/refman/5.5/en/show-create-table.html. You can also just duplicate the table structure - seehttp://dev.mysql.com/doc/refman/5.5/en/create-table.html Then alter the table when you're done. *But that may be harder. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== |
#23
| |||
| |||
|
|
SpreadTooThin: On Dec 17, 2:42 pm, Captain Paralytic <paul_laut... (AT) yahoo (DOT) com> wrote: On Dec 15, 8:20 pm, SpreadTooThin <bjobrie... (AT) gmail (DOT) com> 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? Because that is not implemented in MySQL Workbench. No the database is not populated with data. *This is strictly the design of the tables that I'm working on. Well, you suggested the proper method yourself: copy the table, and then delete columns from the original table and the table-copy as desired. That would require just a couple of minutes with medium-large tables, or seconds with small tables. I just tested it in MySQL Workbench with a table of 15 fields, that need to be splitted into two tables (5 and 10 fields). Is there any problem I overlooked (since it seems so simple, I'm not sure where the problem is)? -- Erick |

#24
| |||
| |||
|
|
On Dec 18, 12:32*pm, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m wrote: SpreadTooThin: On Dec 17, 2:42 pm, Captain Paralytic <paul_laut... (AT) yahoo (DOT) com wrote: >> On Dec 15, 8:20 pm, SpreadTooThin bjobrie... (AT) gmail (DOT) com> 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? Because that is not implemented in MySQL Workbench. No the database is not populated with data. *This is strictly the design of the tables that I'm working on. Well, you suggested the proper method yourself: copy the table, and then delete columns from the original table and the table-copy as desired. That would require just a couple of minutes with medium-large tables, or seconds with small tables. I just tested it in MySQL Workbench with a table of 15 fields, that need to be splitted into two tables (5 and 10 fields). Is there any problem I overlooked (since it seems so simple, I'm not sure where the problem is)? Looking at the IDE one has a tab for a table. That tab has tabs for Table, Columns, Indices etc.. but again you can't have more than one table open at a time and manipulate table contents from one table to the other. |
|
I guess in the end I'm just complaining... because this thread has taken more time to explain than the work needed to simply retype all the fields in the tables!! ![]() |
#25
| |||
| |||
|
|
On Dec 18, 12:04 am, "J.O. Aho" <u... (AT) example (DOT) net> wrote: SpreadTooThin wrote: I'm not moving data! I'm modifying the database structure! The database isn't populated! So why not just modify the EER Model and then drop the current database and "import" the redesigned EER Modle to the database. There IS NO data in the Database there only IS an EER Model that I'm trying to modify in the MySQL WorkBench. That IS the issue. I have 1 table that is being split up into more than one table, but the IDE doesn't give me any method of talking 'columns' (Fields) from one Table, cutting them and Pasting them into another. |
#26
| |||
| |||
|
|
SpreadTooThin: On Dec 18, 12:32*pm, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m wrote: SpreadTooThin: On Dec 17, 2:42 pm, Captain Paralytic <paul_laut... (AT) yahoo (DOT) com wrote: * >> On Dec 15, 8:20 pm, SpreadTooThin bjobrie... (AT) gmail (DOT) com> 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? Because that is not implemented in MySQL Workbench. No the database is not populated with data. *This is strictly the design of the tables that I'm working on. Well, you suggested the proper method yourself: copy the table, and then delete columns from the original table and the table-copy as desired. That would require just a couple of minutes with medium-large tables, *or seconds with small tables. I just tested it in MySQL Workbench with a table of 15 fields, that need to be splitted into two tables (5 and 10 fields). Is there any problem I overlooked (since it seems so simple, I'm not sure where the *problem is)? Looking at the IDE one has a tab for a table. *That tab has tabs for Table, Columns, Indices etc.. but again you can't have more than one table open at a time and manipulate table contents from one table to the other. Have you found the "copy table" command in the context menu of a table rectangle? I did, thank you. |
|
I guess in the end I'm just complaining... because this thread has taken more time to explain than the work needed to simply retype all the fields in the tables!! ![]() But you don't need to retype anything. Just right-click, copy the table, and drop fields from either side. That's what you wanted to do, and that's what the Workbench allows you to. |
|
-- Erick |
#27
| |||
| |||
|
|
On 12/16/2010 12:24 AM, SpreadTooThin wrote: Graduated computer science 1982... You? Long before that. Just started using SQL around 1985 at IBM. |
#28
| |||
| |||
|
|
Jerry Stuckle: On 12/16/2010 12:24 AM, SpreadTooThin wrote: Graduated computer science 1982... You? Long before that. Just started using SQL around 1985 at IBM. http://dilbert.com/strips/comic/2010-12-23/ |
#29
| |||
| |||
|
|
On 12/23/2010 3:03 AM, Erick T. Barkhuis wrote: Jerry Stuckle: On 12/16/2010 12:24 AM, SpreadTooThin wrote: Graduated computer science 1982... You? Long before that. *Just started using SQL around 1985 at IBM. http://dilbert.com/strips/comic/2010-12-23/ A lot more than the youths do! -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== |
![]() |
| Thread Tools | |
| Display Modes | |
| |