I have a table with IP/MAC address combinations and I want to track
which MAC address might have used an IP address other than the one
originally assigned.

Is there some way that I can query my table for duplicate MAC
addresses without specifying a MAC address.

In plain english the query would be something like:
select ip, mac from ipmac where the same mac appears in more than
one row

But how to write the proper sql is my problem. Thanks for any help.

table structure:
create table ipmac (
id smallint unsigned default '1' not null auto_increment,
ip varchar(16) not null,
hwtype char(3) not null,
flags char(3) not null,
mac varchar(20) not null,
mask char(1) not null,
device varchar(8) not null,
updated datetime not null,
key (id),
key (ip),
primary key (ip);
unique index id_idx (id)
);


-- 
Best regards,

Tony Hunter

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to