sql server2005左关联问题
时间:2011-12-06
来源:互联网
(
select 'a'a
union all
select 'b'a
)t1 ,
(
select 'a' aa
)t2
where t1.a *=t2.aa
提示错误:
此查询使用的不是 ANSI 外部联接运算符("*=" 或 "=*")。若要不进行修改即运行此查询,请使用存储过程 sp_dbcmptlevel 将当前数据库的兼容级别设置为 80 或更低。极力建议使用 ANSI 外部联接运算符(LEFT OUTER JOIN、RIGHT OUTER JOIN)重写此查询。在将来的 SQL Server 版本中,即使在向后兼容模式下,也不支持非 ANSI 联接运算符。
作者: hong1987 发布时间: 2011-12-06
select * from
(
select 'a'a
union all
select 'b'a
)t1 left Outer JOin
(
select 'a' aa
)t2
On t1.a =t2.aa
作者: mustudent 发布时间: 2011-12-06
2005已经取消了*=与=* 用Left Outer Join与Right Outer JOin代替了 select * from ( select 'a'a union all select 'b'a )t1 left Outer Join ( select 'a' aa )t2 On t1.a =t2.aa
作者: mustudent 发布时间: 2011-12-06
select * from ( select 'a'a union all select 'b'a )t1 , ( select 'a' aa )t2 where t1.a *=t2.aa --把*= 改成=
作者: maco_wang 发布时间: 2011-12-06
作者: sjcss 发布时间: 2011-12-06
select * from ( select 'a'a union all select 'b'a )t1 left Outer Join--left join ( select 'a' aa )t2 On t1.a =t2.aa
作者: kingtiy 发布时间: 2011-12-06
作者: fredrickhu 发布时间: 2011-12-06
select * from ( select 'a'a union all select 'b'a )t1 left join ( select 'a' aa )t2 on t1.a=t2.aa /* a aa ---- ---- a a b NULL (2 行受影响) */
作者: pengxuan 发布时间: 2011-12-06
作者: yujianing1 发布时间: 2011-12-06
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28