Mysql - self join to check equality -


i have table structure below.

id, firstname, lastname, address, phoneno

i need select firstnames , lastnames repeated. example,

  • 1 bob williams s-oak st 1234567890
  • 2 rob williams n-oak st 1235432222
  • 3 bob williams s-pec st 4332122111

i need make self join , result bob williams.

no need self-join.

select firstname, lastname, count(*) c table group firstname, lastname having c > 1 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -