# REPLACE INTO with Active Record

**URL:** <https://www.ruby-forum.com/t/replace-into-with-active-record/52358>\
**Category:** Rails\
**Created:** [January 13, 2006, 4:02am UTC](https://www.ruby-forum.com/t/replace-into-with-active-record/52358 "2006-01-13T04:02:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil\_swenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f17d59/32.png) [@phil\_swenson](https://www.ruby-forum.com/u/phil_swenson)\
**Post date:** [January 13, 2006, 4:02am UTC](https://www.ruby-forum.com/t/replace-into-with-active-record/52358/1 "2006-01-13T04:02:28Z")

</div>

Is there any support for MySQL’s REPLACE INTO syntax using ActiveRecord?

The only way I’m aware of to take advantage of this feature is to use  
ActiveRecord.connection.execute.

thanks,  
phil

---

<div class="post-metadata">

**Author:** ![phil\_swenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f17d59/32.png) [@phil\_swenson](https://www.ruby-forum.com/u/phil_swenson)\
**Post date:** [January 13, 2006, 4:22am UTC](https://www.ruby-forum.com/t/replace-into-with-active-record/52358/2 "2006-01-13T04:22:07Z")

</div>

On Fri, Jan 13, 2006 at 04:02:28AM +0100, phil swenson wrote:

> Is there any support for MySQL’s REPLACE INTO syntax using ActiveRecord?
> 
> The only way I’m aware of to take advantage of this feature is to use  
> ActiveRecord.connection.execute.

REPLACE INTO is not supported in ActiveRecord’s MySQL adapter.

marcel
