mysql从一张表查出数据存到另一张表和inner join的用法

发布时间:2020-05-23 06:00:05发布者:Mr.Zhang阅读(185)

INSERT INTO test_table_public(class, name, geography)  SELECT class, name, geography FROM test_table WHERE id >= 137181 AND id <= 137214;

SELECT class, name, geography FROM test_table WHERE id >= 137181 AND id <= 137214;

SELECT t1.class, t1.name, t2.geography, t1.test FROM test_table t1 INNER JOIN test_table_public t2 ON t1.name = t2.name;

 





本文转自博客园,原文地址:https://www.cnblogs.com/zrmw/p/12940309.html

自己做的一款记账小程序,请多多支持