我想比较两个查询结果,看看它们是否相同。如果结果相同,我想显示一个MessageBox
; 如果不做其他事情。
using (OracleCommand crtCommand = new OracleCommand(query1, conn1))
{
string result1 = crtCommand.ExecuteScalar().ToString();
}
using (OracleCommand ctCommand = new OracleCommand("query2", conn1))
{
string result2 = ctCommand.ExecuteScalar().ToString();
}
if (result1 == result2)
MessageBox.Show("They are same");
else
MessageBox.Show("They are not same");