select * into 你要生成的表名 from temptable1 where I_intime>='2007.01' and not exists
(select * from temptable1 where I_intime<'2007.01' and i_R_num='I_r_num'and i_company='I_company')
(select * from temptable1 where I_intime<'2007.01' and i_R_num='I_r_num'and i_company='I_company')
解决方案 »
- 问个很基础的问题。SQL语句的
- 好吧,我早上有点发傻了,问题还没解决,重新发帖
- 获取表TAB中排第66至70的记录,数据是按id升序排列的,当id不连续的,sql语句怎么实现?
- 某数据库转移到另一台机上使用的问题
- 对大家太简单的一句SQL语句
- sql查询分析器查询结果粘贴到excel中有的有的数据都跑到一个单元格了如何解决!
- SQL SERVER如何建一个表关自动生成一千条数据
- 请问怎么的sql语句该如何写好呢?先谢谢了,请帮忙看看!
- 我遇到鬼了,明明是NULL,我用查询的时候用WHERE = NULL 时竟然查不到东西,但查出所有的来看时是NULL
- 在树结构表中,sql代码如何批量设置表中每一栏目(typeID)的子栏目的数量(SonCount)
- 请问编写仓库程序时,如何规划车间数据库以及得到车间的盘点表。
- 如何在执行存储过程时,使该存储过程中的语句不在一个batch中执行,而可以分多个batch执行
goselect * into TAB_New from temptable1 where I_intime>='2007.01' and not exists
(select * from temptable1 where I_intime<'2007.01' and i_R_num='I_r_num'and i_company='I_company')
(select * from temptable1 where I_intime<'2007.01' and i_R_num='I_r_num'and i_company='I_company')