How to save the record in table using SQL query

Hello All,

how to execute

insert into employ values(‘mitesh’,1);

how to execute this directly with out using .save function.

Thanking you

On May 2, 12:14 pm, Mitesh J. [email protected] wrote:


Posted viahttp://www.ruby-forum.com/.

What is your context?
Here is my guess. How about this: YourClass.executeQuery(“insert into
employ values(‘mitesh’,1)”);

On Wed, May 02, 2007 at 02:14:25PM +0900, Mitesh J. wrote:

Hello All,

how to execute

insert into employ values(‘mitesh’,1);

how to execute this directly with out using .save function.

At a complete guess - since you don’t say so yourself - I think you’re
using
Rails / ActiveRecord. In that case, the RoR google group is a better
place
to ask.

But you could try:

YourModel.connection.execute(“insert into employ …”)