搜索
您的当前位置:首页正文

MySQL 经典赋值语句

来源:爱go旅游网
INSERT INTO sn_survey_task_dispatch_casepoint_info 
(task_no, case_point_no,case_point_type,case_point_name,
investigator,is_effective_point,province,city,district)
(SELECT taskno, casepointdetno , casepoint, casepointdet  ,investigator,
effectivepointflag , province,city,district
FROM sn_survey_task_dispatch_casepointdet WHERE taskno = 'DT202105215636');
  1. 把一个表的字段更新另一个表的字段 
update table1 set 
field1=table2.field1,
field2=table2.field2
from table2
where table1.id=table2.id

因篇幅问题不能全部显示,请点此查看更多更全内容

Top