根据条件用一个表update另外一个表
update table1 set id=t2.id from table1 t1,table t2 where t1.name=t2.name
根据已有内容创建一个新表
select id,name into newtable from oldtable where .............
根据条件用一个表update另外一个表
update table1 set id=t2.id from table1 t1,table t2 where t1.name=t2.name
根据已有内容创建一个新表
select id,name into newtable from oldtable where .............