MySQL Forums
Forum List  »  MySQL Query Browser

creating table from query
Posted by: Troy Perkins
Date: February 01, 2011 01:01AM

I am wanting to conduct a query on one table, then create a table and use the results as variables in creating another table. For example: query field1,field2 from table, then use field1 to name the column headings of each row and set the data types for each column.

CREATE TABLE testing SELECT field2,field6 FROM `Relax_Data_Dictionary_v3.1`;

gets me my two varibles, field2 being my column headings(names) and field6 being the list of variables for my data types of each column.

Puzzled as to how to specify during the table creation process to use these variables as intended to be applied.

-Troy



Edited 1 time(s). Last edit at 02/01/2011 01:04AM by Troy Perkins.

Options: ReplyQuote


Subject
Written By
Posted
creating table from query
February 01, 2011 01:01AM
February 10, 2011 03:28AM
March 21, 2011 06:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.