user1321824
user1321824

Reputation: 445

Retrieve data from Table

I have a table as follows,

Id             Form_Id     Form_Layout_Txt
-------------- ----------- -----------------
2              1           aa
3              1           bb
5              2           dddd
6              2           eeeee
7              3           fffff
8              3           gggg

i need to retreive the rows which has same Form_id as follows,

2              1           aa
3              1           bb

How to write a query for the above data?

Thanks

Upvotes: 0

Views: 46

Answers (2)

K.P
K.P

Reputation: 66

Select * 
from nameoftable 
where  Form_Id = 1;

Upvotes: 2

bonCodigo
bonCodigo

Reputation: 14361

Here is what you need at most basic level, unless there's a hidden immunity to find out more :)

SELECT * FROM YOUR TABLE 
WHERE FORM_ID = 1

Upvotes: 2

Related Questions