database - How to nested SQL Queries? -
select id, (select top 1 content id=id(in table a) b) content
i want query data table base on id in each of a, , query other data id @ same time, transfer new column.
anybody know how it?
sounds want correlated query, can (example sql server, based on usage of top n):
select a.id, (select top 1 content b b.id = a.id ) content
Comments
Post a Comment