how to execute create table on fly

feng wrote the following on 06.04.2007 15:25 :

Florian Gilcher wrote:

I won't hold you back, but perhaps you should think about you solution -
temp tables are always strange.. Anyways,

ActiveRecord::Base.execute(sql, name=nil)

is your friend.
thanks. and I find "execute" in my "Agile" book.

However, I still don't know how to "execute" it in my controller.

if I add this line:

List.execute ("drop table if exists testtable;")
List.connection.execute should do it.