f



From table to table....

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?

0
bjobrien62 (537)
2/1/2012 6:29:45 PM
comp.databases.mysql 6944 articles. 1 followers. laredotornado (869) is leader. Post Follow

1 Replies
1223 Views

Similar Articles

[PageSpeed] 59

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

> 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/en/create-table-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
0
hellsop (974)
2/1/2012 8:50:23 PM
Reply: