how can i know the multiples max values between 2 tables in same time in sql

  • 1 Comment sorted by
  • hi you can see all max value from two table like this
    select Price from
    (
    select Price from table1
    union
    select Price from table2
    ) t
    order by Price desc

    or you want select just three max value from two table so you can use this query with top clause like this.
    select top 3 Price from
    (
    select Price from table1
    union
    select Price from table2
    ) t
    order by Price desc

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Tagged

Popular Posts of the Week

Top Posters Weekly

Optimum Creative