Rails temporary table?

hi all
any one know how to create a temporary table and fill it, like:

#------------------------------------------------------------
create temporary table test1 select * from test;
#------------------------------------------------------------

regards.

ActiveRecord::Base.connection.execute my_sql_string

Joe B. <allenbobo@…> writes:

#------------------------------------------------------------
create temporary table test1 select * from test;
#------------------------------------------------------------

Using Migration/Schema parlance, you can do:

create_table (:test1), :temporary=> true do |t|
  t.column :field1, :string, :limit => 50
  t.column :field2, :string, :limit => 50
end

-damon

thanks

Kyle M. and Damon C.

cheers

Damon C. wrote:

Joe B. <allenbobo@…> writes:

#------------------------------------------------------------
create temporary table test1 select * from test;
#------------------------------------------------------------

Using Migration/Schema parlance, you can do:

create_table (:test1), :temporary=> true do |t|
  t.column :field1, :string, :limit => 50
  t.column :field2, :string, :limit => 50
end

-damon
http://damonclinkscales.com/