意思就是把BB中的日改成AA中的日
解决方案 »
- 比较两句SQL有何不同
- sql执行计划怪事
- 你觉得Northwind数据库中建立这么多表,而且表与表之间有着复杂的关系,这是为什么?
- 2万条的数据要查询多久
- 特弱问题请高手解答
- 在sql server2000中建立一个视图(view),该视图是表A与表B的完全外联接,联完后有些字段是NULL,如何给它一个默认值?
- 关于运行存储过程 导致temp数据库增加,运算停止的问题。
- 新人请求帮助 sql 中如何查询包含列数最多的行?
- 求助!请问在ACCESS中如果使用了自动编码,如果我删除了某记录,如何让它按大小自动重新顺序编码(如把第23条删去,后面的记录顺序往前变
- 真是火大,被TextPtr弄得走投無路,各位請幫忙!!!
- 求检查不同行的数据之两列值是否一致的方法
- 一对多的查询问题
drop table [dbo].[testaa]
if exists(select * from dbo.sysobjects where id=object_id(N'[dbo].[testbb]') and objectproperty(id,'istable')=1)
drop table [dbo].[testbb]
create table testaa(id int identity(1,1),d datetime)
insert into testaa select '2005-1-15'
union all select '2005-2-2'
create table testbb(id int identity(1,1),d datetime)
insert into testbb select '2005-1-9'
union all select '2005-2-28'select * from testaa
select * from testbbupdate testaa set d=left(convert(varchar(10),a.d,120),8)+right(convert(varchar(10),b.d,120),2)
from testaa a
inner join testbb b
on a.id=b.idselect * from testaa
select * from testbb