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

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

.net - Self Tracking Entities (STE)'s and partial updates with EF4 and mVC2 -