首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

怎么写这个insert

2012-03-25 
如何写这个insert?该表字段有4个,MACHINE_ID、NAME、ENTRY、STATE。其中MACHINE_ID为001的数据有17条。我想插入

如何写这个insert?
该表字段有4个,MACHINE_ID、NAME、ENTRY、STATE。
其中MACHINE_ID为001的数据有17条。
我想插入MACHINE_ID为002,其他字段值与MACHINE_ID为001的数据相同的17条记录,
如何写这个sql?  


[解决办法]
insert into tbl
select '002 ',name,entry,state from table1 where machine_id= '001 ';

热点排行