Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the two categories of MySQL subqueries

Shulou Source: shulou.com Published: 2022-05-31 10:42:12 09月23日 Update

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.

Tags: Queries classifications knowledge articles locations contents results differences big most that is data more theory knowledge points industry information information channels logic quantum Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Linux Shulou Tech Info Docker NVidia