Chinaunix首页 | 论坛 | 博客
  • 博客访问: 362587
  • 博文数量: 94
  • 博客积分: 2500
  • 博客等级: 少校
  • 技术积分: 823
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-04 16:49
文章分类

全部博文(94)

文章存档

2015年(1)

2011年(1)

2010年(3)

2008年(8)

2007年(55)

2006年(26)

我的朋友

分类: 数据库开发技术

2007-09-13 20:02:44

insert into tablename(feild1,feild2,...) select feild1,seild2,... from anothertable where ...
这是在数据库课程中学过的,没想到都已经忘了。
 
select * into anothertable from table where...
 
 如果涉及到从Excel中存取数据,方法是:
insert into PlotInfo(state,plantation,pcode,plot) select distinct state, plantation, pcode, plot from [Excel 8.0;database=c:\\abc.xls].[sheet1$]
 
select state, plantation, pcode, plot into into [Excel 8.0;database=c:\\abc.xls].[sheet1$] from PlotInfo,PlotMeasure,Tree where PlotInfo.state=PlotMeasure.state
 
这样可以实现数据的快速导入导出。
阅读(850) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~