Oracle不等式运算符:¬= [英] Oracle inequality operator: ¬=
问题描述
Oracle SQL 据说有四个不等式运算符:
Oracle SQL supposedly has four inequality operators:
-
!=
-
^=
-
<>
-
¬=
!=
^=
<>
¬=
( PL/SQL运算符是稍有不同.它们允许使用~=
而不是¬=
.但这在这里并不直接相关.)
(PL/SQL operators are a little different. They allow ~=
instead of ¬=
. But that is not directly relevant here.)
该手册包含警告某些形式的不平等条件可能在某些平台上不可用".这至少适用于第四个选项¬=
.在Windows,Linux或Solaris上,该语法不适用于我.
The manual includes the warning "Some forms of the inequality condition may be unavailable on some platforms." This applies to at least the 4th option, ¬=
. That syntax doesn't work for me on Windows, Linux, or Solaris.
我的问题是:
- 哪些平台支持
¬=
? - 哪些平台(如果有)不支持
!=
,^=
或<>
?是否值得避免其中之一来确保我的代码尽可能地可移植?
- What platforms support
¬=
? - What platforms, if any, do not support
!=
,^=
, or<>
? Is it worth avoiding one of those to ensure my code is as portable as possible?
推荐答案
关于各种不等式运算符的推导和可用性,这是我的最佳猜测:
Here's my best guess as to the derivation and availability of the various inequality operators:
-
<>
-原始.由多种语言(BASIC,Pascal等)使用. 可能在所有平台上都可用. -
!=
-来自C及其派生类(C,C ++,Java,C#等)等等.我预计 在所有平台上都可用. -
¬=
-此运算符可能仅在IBM大型机上可用.我知道 我刚刚尝试了它在HP-UX上不受支持.亲爱的 我的心从语言PL/I(大写的"i"而不是"1", 尽管它代表罗马数字一个",因此该语言 是小便一号".我知道您想知道:-),IBM的混蛋 继子... a,我的意思是FORTRAN,Algol的令人愉快的组合" 和一点COBOL. PL/I是第二台高级计算机 我学到的语言和我用来谋生的第一门语言 软件开发人员.从过去的好日子开始,男人是男人, 女人是女人,电脑是水冷的.那不是吗 是的,约西亚. (对于那些能够 确定那条线是从哪里来的!) -
^=
-我怀疑这与前面的仅IBM"相似 运算符,使其成为在计算机上使用的"IBM ish"运算符 缺少IBM的¬"(非)字符.可能在所有平台上都受支持.
<>
- the original. Used by a number of languages (BASIC, Pascal, etc). Probably available on all platforms.!=
- from C and it's derivatives (C, C++, Java, C#, etc, blah). I expect this is available on all platforms.¬=
- This operator is probably only available on IBM mainframes. I know it's not supported on HP-UX as I just tried it. Near and dear to my heart. From the language PL/I (that's capital 'i', not '1', although it represents the Roman numeral "one", and thus the language is "pee ell one". I knew you wanted to know that :-), IBM's bastard stepchild...ahem, I mean "delightful combination" of FORTRAN, Algol, and a touch of COBOL. PL/I was the second high-level computer language I learned and the first one I used in making a living as a software developer. From the Good Old Days, when men were men, women were women, and computers were water-cooled. Isn't that right, Josiah..? (And ten points extra credit for those who can identify where THAT line comes from!)^=
- I suspect this is meant to be similar to the preceding "IBM-only" operator, making it an "IBM-ish" operator for use on computers which lack the IBM "¬" (not) character. Probably supported on all platforms.
FWIW我总是使用<>
.像老程序员一样,老习惯会死得很重. :-)
FWIW I always use <>
. Old habits, like old programmers, die hard. :-)
这篇关于Oracle不等式运算符:¬=的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!