本文介绍了加入sql2005中的'= *'在sql2012中不接受的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的项目使用sql2005 当我需要加入时 写 选择* 来自A,B 其中 A.ID * = B.ID ''(* =)''在sql2005中没问题 但在sql2012中不接受 我可以做些什么来解决它问题???
解决方案该运算符在2005版本之后停止。 您仍然可以通过设置 COMPATIBILITY_LEVEL 在中的80> SQL Server 2008 R2 。 但你不能在2012年这样做。那里2012年无法做到这一点。 参考 - 外部加入运算符(+) - Oracle到SQL Server迁移 [ ^ ]。 解决方案 而不是尝试 ANSI 标准( LEFT OUTER JOIN ),如下所示。 请使用此标准,因为非ANSI标准在2005年之后以及将来的版本中停止使用。 SELECT * FROM A LEFT OUTER JOIN B WHERE A.ID = B.ID
参考 - 查询使用非ANSI外连接运算符(* =或= *)。 [ ^ ]
i have project used sql2005 and when i need to join write select * from A ,B where A.ID *= B.ID ''( *= )'' is no problem in sql2005 but in sql2012 is not accept that what i can Do to solve it problem???
解决方案 This operator is discontinued after version 2005. You can still use it by setting the COMPATIBILITY_LEVEL to 80 in SQL Server 2008 R2. But you can''t do it in 2012. There is no way to do this in 2012. Refer - Outer Join Operator (+) - Oracle to SQL Server Migration[^]. Solution Instead of this try the ANSI Standard (LEFT OUTER JOIN) like below. Please use this standard as the non-ANSI standards are discontinued after 2005 and in future versions also. SELECT * FROM A LEFT OUTER JOIN B WHERE A.ID = B.IDRefer - The query uses non-ANSI outer join operators ("*=" or "=*").[^] for examples.
更多推荐
加入sql2005中的'= *'在sql2012中不接受
发布评论