In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1.3 Multi-table query
1.3.1 join query:
# Internal connection:
Self-join query:
# external connection
Left outer join (all records of table name 1 can be queried, but only matching records can be found in table name 2)
SELECT attribute name list FROM table name 1 LEFT JOIN table name 2 ON table name 1. Attribute name 1 = table name 2. Attribute name 2
# right outer connection (all records of table name 2 can be queried, but only matching records can be found in table name 1):
Insert some values into the right table first:
Then do the right outer join query:
1.4 modify the fields of some records
Earlier, I briefly introduced insert into and select * from, and then I went on to say change.
1.4.1 single table update
The simplest expression is:
Add some more restrictions as follows:
The results are as follows:
1.4.2 Multi-table update
Well, this example is of no use at all, because we are only associated with sid, which can be written separately as two updates.
However, in the case of multiple table updates, if there are two related tables, such as the roll-out table and the transfer-in table, there are interdependent keys, so that some states are closely related and updated together. (it seems to be OK with transactions.)
……
The above results are as follows:
1.5 Delete
For a detailed mysql deletion operation, you can view the article
Http://www.cnblogs.com/ggjucheng/archive/2012/11/06/2756420.html
Single table record deletion:
DELETE FROM table name WHERE conditional expression [ORDER BY field] [number of LIMIT record rows]
The original data went like this:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.