建虚拟表起标识列 我有表A,表B。我想从表A和B中查询出几条数据放在新建的虚拟表C中,并给C起个标识列,请问我该怎么操作。谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select *,id=identity(int,1,1) into #c from a --如果A,B结构相同:select *,id=identity(int,1,1) into #cfrom (select * from a union allselect * from b) t select id=identity(int,1,1),a.*,b.* into C from a join b on 条件 我A表和B表中有相同的数据,我想在C表中去掉一列,让相同的只显示一条,那该怎么办呢?用min ? select id=identity(int,1,1),a.*,b.* into C from a join b on 条件a表跟B表有相同的列不要查出来就好了,, 好的学习资料下载,大家来加速~ 无法脱机,遇到"如果其他用户正使用数据库.."错误 求一存储过程写法,更新数据, 在SQL中要存储图片路径,应设置其路径为什么数据类型? 如何取ntext类型字段的前200个字符? 请教:这条语句是什么意思 日期时间型转换为字符串型的问题? 100分悬赏 触发器 求助高手 悬赏100分 小问题 如果客户用了软件不付钱怎么办??? _variant_t 转化为csting 数组传入到存储过程当参数的问题
select *,id=identity(int,1,1) into #c
from
(select * from a
union all
select * from b
) t
用min ?
select id=identity(int,1,1),a.*,b.* into C from a join b on 条件a表跟B表有相同的列不要查出来就好了,,