Skip to content
Advertisement

MySql Select Statement (Other Company)

I am trying to select distinct users that are listed for other companies but not on my company (1). Here is an example

From this table, I would like to get row 4 since he is in other company (not 1) but listed on others. I do not want others because they are listed on both my company and others. Anyone can help?

Advertisement

Answer

You can use NOT IN. For example:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement