Gabriell Carter Gabriell Carter - 1 year ago 62
SQL Question

SQL - How do I exclude results from a table if they have the same data in two columns

For example, I have a Cargo Shipment table and within that table there are two columns; Origin and Destination. How would I make it so that any results I get from my select statement will be excluded if the values in these columns are the same?

To be more specific, I could have a row where both Origin and Destination equals 'Chicago', how would I exclude that row without also excluding rows that have either Origin or Destination as Chicago.

Answer Source
    Origin != Destination
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download