Reputation: 445
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
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