mysql 给查询结果新增一个字段,并设定默认值

SELECT '第一中学' as school, class, name, geography FROM test_table WHERE test = 1;

 

 插入新table:

REPLACE INTO test_school(school, class, name, geography) SELECT '第一中学' as school, class, name, geography FROM test_table WHERE test = 1;

 

posted @ 2020-05-28 15:29  正态分个布  阅读(6246)  评论(0编辑  收藏  举报