mysql 給查詢結果新增一個字段,並設定默認值

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

 

 插入新table:spa

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

相關文章
相關標籤/搜索