# Retrive record without id field

**URL:** <https://www.ruby-forum.com/t/retrive-record-without-id-field/164640>\
**Category:** Rails\
**Created:** [April 3, 2009, 4:09pm UTC](https://www.ruby-forum.com/t/retrive-record-without-id-field/164640 "2009-04-03T16:09:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sushrut](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Post date:** [April 3, 2009, 4:09pm UTC](https://www.ruby-forum.com/t/retrive-record-without-id-field/164640/1 "2009-04-03T16:09:54Z")

</div>

Hi,  
How to retrive the record without using the id field.  
I have to use the table having singular and in that table there is no id  
field then how to fetch that table in my application.

---

<div class="post-metadata">

**Author:** ![sushrut](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Post date:** [April 3, 2009, 4:27pm UTC](https://www.ruby-forum.com/t/retrive-record-without-id-field/164640/2 "2009-04-03T16:27:31Z")

</div>

On 3 Apr 2009, at 15:09, Sushrut S. wrote:

> Hi,  
> How to retrive the record without using the id field.  
> I have to use the table having singular and in that table there is  
> no id  
> field then how to fetch that table in my application.

You could use find :first or find :all, just specify whatever  
conditions are relevant.

Fred
