当前位置:网站首页>Basic operations of MySQL auto correlation query

Basic operations of MySQL auto correlation query

2022-06-13 05:15:00 strive_ one

Basic operations of Auto Association query

Query all provinces and autonomous regions

select * from province where pid=0;

 Insert picture description here
 Insert picture description here

Statistics on all provinces, autonomous regions and municipalities directly under the central government in China :

 Insert picture description here

What cities are there in Guangdong Province ( Imagine two tables ):

select p.name,s.name from province as p inner join province as s on s.pid=p.id where p.name = " Guangdong province, ";

 Insert picture description here

原网站

版权声明
本文为[strive_ one]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280514548737.html