-
select multiple rows into one row
i want to query from two tables and return one row. Problem is there could be multiple rows in the 2nd table.
Table tabs
id name
----------------
1 myTab
2 yourTab
Table tabsaccess
tab_id user_id group_id
------------------------
1 1700 null
1 8 null
1 null 5000
1 null 5001
i want to query for a tab id and return the id, name, a list of user_ids and a list of group ids in one row.
Return
id name user_id group_id
--------------------------
1 myTab [1700, 8] [5000, 5001]
Is it possible?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|