# Insert into an Oracle table no working

**URL:** <https://discuss.rubyonrails.org/t/insert-into-an-oracle-table-no-working/13432>\
**Category:** rubyonrails-talk\
**Created:** [May 25, 2007, 12:52am UTC](https://discuss.rubyonrails.org/t/insert-into-an-oracle-table-no-working/13432 "2007-05-25T00:52:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EmilSF](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@EmilSF](https://discuss.rubyonrails.org/u/EmilSF)\
**Post date:** [May 25, 2007, 12:52am UTC](https://discuss.rubyonrails.org/t/insert-into-an-oracle-table-no-working/13432/1 "2007-05-25T00:52:49Z")

</div>

I ran into a similar problem. I created a new ROR app that had to work with an existing legacy database (Oracle). The db has a members table. The primary key was already named 'mem\_id'.

So, in my model I have: &nbsp;&nbsp;set\_table\_name "members" &nbsp;&nbsp;set\_primary\_key "mem\_id"

&nbsp;&nbsp;set\_sequence\_name "mem\_id\_seq"

It works after I added set\_sequence\_name. I got the same Oracle 'sequence does not exist error' before I added that.

good luck. -emil
