What are the two categories of MySQL subqueries
Today, I would like to share with you the relevant knowledge of what the two categories of MySQL sub-query are. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article, let's take a look at it.
1. Classification by location: the location where the subquery appears in the external query is divided into where word query and from subquery.
SELECT * FROM film WHEREprice > (SELECT price FROM film WHERE fid=3)
2. Classify according to the results: classify according to the data obtained by the subquery-theoretically, the result of any query can be understood as a two-dimensional table.
It is divided into scalar quantum query, column subquery, row subquery and table subquery.
SELECT vname FROM vip WHEREaddress= (SELECT address FROM vip WHERE vname=' Zhang Sanfeng') these are all the contents of this article entitled "what are the two categories of MySQL subqueries?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.