mysql - a SELECT that returns the highest 'views' and a specific id's 'views' -


Is it possible to write a single query that can return two rows, one is specified in the WHERE section and the other The highest table.

For example.

  Table_1 -row_id -views -content  

Is there a query that can add the following:

  Table_1 Where to select from row_id = 10 SELECT MAX (views) Table_1  

Or two questions are my only option?

I think technically it is possible to use a single query; However, you can use the UNION operator

  Select Table_1 WHERE row_id = 10 UNION Table_1  

Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -