Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 24th, 2012  |  syntax: None  |  size: 1.62 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. mysql> select master.dn from master left outer join slave on (slave.dn=master.dn) where slave.dn is null;
  2. +-------------------------------------------------+
  3. | dn                                              |
  4. +-------------------------------------------------+
  5. | dc=hq,dc=local                                  |
  6. | cn=Directory Administrators,dc=hq,dc=local      |
  7. | ou=Groups,dc=hq,dc=local                        |
  8. | ou=People,dc=hq,dc=local                        |
  9. | ou=Special Users,dc=hq,dc=local                 |
  10. | cn=Accounting Managers,ou=Groups,dc=hq,dc=local |
  11. | cn=HR Managers,ou=Groups,dc=hq,dc=local         |
  12. | cn=QA Managers,ou=Groups,dc=hq,dc=local         |
  13. | cn=PD Managers,ou=Groups,dc=hq,dc=local         |
  14. +-------------------------------------------------+
  15. 9 rows in set (0.00 sec)
  16.  
  17. mysql> select slave.dn from slave left outer join master on (mater.dn=slave.dn) where master.dn is null;
  18. ERROR 1054 (42S22): Unknown column 'mater.dn' in 'on clause'
  19. mysql> select slave.dn from slave left outer join master on (master.dn=slave.dn) where master.dn is null;
  20. +-------------------------------------------------+
  21. | dn                                              |
  22. +-------------------------------------------------+
  23. | dc=qh,dc=local                                  |
  24. | ou=Groups,dc=qh,dc=local                        |
  25. | cn=PD Managers,ou=Groups,dc=qh,dc=local         |
  26. | cn=QA Managers,ou=Groups,dc=qh,dc=local         |
  27. | cn=HR Managers,ou=Groups,dc=qh,dc=local         |
  28. | cn=Accounting Managers,ou=Groups,dc=qh,dc=local |
  29. +-------------------------------------------------+
  30. 6 rows in set (0.00 sec)