custom sql query

Hello.

How can I run custom slq query? I want to delete all rows from table, which is not mapped to activerecord model. Thanks.

Fero.

ActiveRecord::Base.connection.execute '...'

(there's also ActiveRecord::Base.connection.delete, ActiveRecord::Base.connection.insert, ActiveRecord::Base.connection.update etc... which you should use if possible as these will invalidate the query cache)

Fred