dbTalk Databases Forums  

From table to table....

comp.databases.mysql comp.databases.mysql


Discuss From table to table.... in the comp.databases.mysql forum.



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

Default From table to table.... - 02-01-2012 , 12:29 PM






I want to create a new table containing only the results from a select statement of another table. How is that done?

select a, b, c into destTable from sourceTable where a='x' or a='y' or a='z';

Does one have to create the destTable or is it created for you with the correct structure?

Can the rows of one table be used in the select of another table?
eg: The above select statement has three choices. could those 'choices' have been rows of a column of a table?

Reply With Quote
  #2  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: From table to table.... - 02-01-2012 , 02:50 PM






On Wed, 1 Feb 2012 10:29:45 -0800 (PST), SpreadTooThin wrote:

Quote:
I want to create a new table containing only the results from a select
statement of another table. How is that done?
http://dev.mysql.com/doc/refman/5.1/...le-select.html

Uhm... You DO know about websearches, right?

--
73. I will not agree to let the heroes go free if they win a rigged
contest, even though my advisors assure me it is impossible for
them to win.
--Peter Anspach's list of things to do as an Evil Overlord

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.