Reputation: 784
I got main object in table-A
. table-B
consists of some ids
of objects in table-A
of and time in millis
. I want to get those objects from table-A
whose id
is in table-B
sorted by time in millis
in table-B.
I got the unsorted objects with this query:
Select * from $table-A where id in (Select id from $table-B)
I am stuck on sorting them by the time in table-B
Upvotes: 0
Views: 72
Reputation: 1269953
You would use join
:
Select *
from a join
b
on a.id = b.id
order by b.time_in_milliseconds
Upvotes: 2