combining resultset obtained by select statements to create a view
问题 I have 4 Select statements for 4 different tables each Select query gives latest record meeting specified condition for ex: Select TOP 1 * from table where column_name = 'something' order by col1 DESC; Now I have to combine result set of all 4 queries and create a view from combined result set. 回答1: Some DB's don't let you provide an "order by" clause inside on of the unioned queries. If you're ordering by col1 desc, it's possible that it's some type of column you can apply min() or max() to.