帮忙写个sql 急 id tel tel1 1 a2 a3 a4 a5 a6将id 是 3-5 的 tel 中的内容 剪切下来 插入到 tel1字段中的sql语句如何写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 INSERT TB (TE1)SELECT TEL FROM TB WHERE ID BETWEEN 3 AND 5 UPATE TB SET TE1=TEL FROM TB WHERE ID BETWEEN 3 AND 5 update 表 set tel1=tel where id id between 3 and 5?? update tel1 = tel ,tel='' from table where id >2 and id <6 update tb1 set tel1=telwhere id in(3,4,5) update set tel1=tel,tel='' where id>=3 and id<=5 update TB SET TE1=TEL FROM TB WHERE ID BETWEEN 3 AND 5 update tb set tel1=tel where id id between 3 and 5 update tb set tel1=tel,tel='' where id>=3 and id <=5 不能将值 NULL 插入列 'ID',表 '02.dbo.02';列不允许有空值。INSERT 失败。INSERT 02(Tel1)SELECT Tel FROM 02 WHERE ID>10000 and id<20000提示出错啊 update TB SET TE1=TEL FROM TB WHERE ID BETWEEN 3 AND 5 这样写也不行啊 那表中0-2 tel1字段就为空了 tel tel1eee ee ee ee e上面两行为空 出现这种情况了 那你结果想要什么样子,也是TEL?? tel tel1 a a a a atel tel1a aa aa aaa第一张变成第二张 update tb set tel1=tel,tel=null where id between '3' and '5'--------------结果1 a 2 a 3 NULL a4 NULL a5 NULL a6 -------------楼主是不是想要这个结果 实在猜不透楼主想要什么, 这个哪里是 “将id 是 3-5 的 tel 中的内容 剪切下来 插入到 tel1字段中” ID Tel Tel1 1 A null 2 B null 3 C null 4 D null 5 E null变成 ID Tel Tel1 1 A C 2 B D 3 c E 4 D Null 5 E Null就是这样 公司要处理excel表 记录有几十万条 所有我就想用sql处理 将需要的 select 入一临时表再处理. update a set a.Tel1=b.Telfrom tb a,tb b where a.id=b.id-2 and b.id between 3 and 5 select a.id id,a.tel tel,b.tell tell from tb a,tb b where a.id between 1 and 2and b.id between 3 and 5; sql server 2005 instead of 触发器 请问这样的查询怎么写? 2 当View中用了Left /Right Join等外连接时,就不能在该View上建立索引 联合主键,SQL语句怎么写? 请教行列转换SQL (getdate()) 怎样在默认值里去掉秒? insert问题 请教sql安装问题,高分相赠 在有重复的数据中取出日期最小的一条,改如何写这个SQL? 请问高手个子查询的问题? sql雙重篩選 通过名字查id,有相同名字的怎么返回多个id?
set tel1=tel
where id in(3,4,5)
提示出错啊
e
e
e e
e e
e e
e e
上面两行为空 出现这种情况了
a
a
a
a
atel tel1
a a
a a
a a
a
a第一张变成第二张
2 a
3 NULL a
4 NULL a
5 NULL a
6 -------------楼主是不是想要这个结果
ID Tel Tel1
1 A null
2 B null
3 C null
4 D null
5 E null变成
ID Tel Tel1
1 A C
2 B D
3 c E
4 D Null
5 E Null就是这样
公司要处理excel表 记录有几十万条 所有我就想用sql处理
from tb a,tb b where a.id=b.id-2 and b.id between 3 and 5
and b.id between 3 and 5;