oralce中,表有两个字段 fld1 fld2,
fld1 fld2
a b
b a若是如上面那样有出现两个字段值互换的情况下,如何判断两条记录是相同的,取出记录数为1来比如 如下情况
fld1 fld2
a b
b a
a c
取出记录数是2fld1 fld2
a b
b a
a c
c a
取出记录数是2
fld1 fld2
a b
b a若是如上面那样有出现两个字段值互换的情况下,如何判断两条记录是相同的,取出记录数为1来比如 如下情况
fld1 fld2
a b
b a
a c
取出记录数是2fld1 fld2
a b
b a
a c
c a
取出记录数是2
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/
http://msdn.microsoft.com/en-us/library/bb338049.aspx
public bool Equals(Product x, Product y)
{ //Check whether the compared objects reference the same data.
if (Object.ReferenceEquals(x, y)) return true; //Check whether any of the compared objects is null.
if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
return false; //Check whether the products' properties are equal.
return (x.Code == y.Code && x.Name == y.Name)||(x.Code == y.Name && x.Name == y.Code);
}
没怎么看明白意思,平时都是用的SQL2000,对ORACLE不怎么熟悉,复制你的语句到PLSQL里面,在 where not exists前提示SQL命令未正确结束。能再详细点吗?我是菜鸟,谢谢了。