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

···

--
Posted via http://www.ruby-forum.com/.

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

···

On May 2, 12:14 pm, Mitesh Jain <mitijain...@gmail.com> wrote:

Hello All,

how to execute

insert into employ values('mitesh',1);

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

Thanking you

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

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 ...")

···

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

Hello All,

how to execute

insert into employ values('mitesh',1);

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