Not exactly. The allowed letters are A,B,C,D, E, F. Every 2 characters
(not including separators) can be treated as a hexadecimal number that
can be represented with one byte. 6 bytes in total.

 

for example: 00:1D:7D:48:08:8F 

 

pair                   value                 

00                     0                      1st byte

1D                    29                     2nd byte

7D                    125                   3rd byte

48                     72                     4th byte

08                     8                      5th byte

8F                    143                   6th byte

 

the last 2 bytes (of the BIGINT) left unused.

 

Ilia

________________________________

From: Fish Kungfu [mailto:fish.kun...@gmail.com] 
Sent: Thursday, May 14, 2009 3:54 PM
To: Ilia KATZ
Cc: mysql@lists.mysql.com
Subject: Re: MAC address as primary key - BIGINT or CHAR(12)

 

Since MAC addreses also contain letters, BIGINT wouldn't work.  So, yes,
I would say go with CHAR(12).

        On May 14, 2009 9:43 AM, "Ilia KATZ" <ik...@dane-elec.co.il>
wrote:
        
        Hi.
        Currently I have a table:
        1. MAC address defined as BIGINT
        2. MAC address set as primary key
        
        Should I consider changing it to CHAR(12)?
        
        Replies will be appreciated.
        Ilia
        
        
        




************************************************************************
************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals &
computer viruses.
************************************************************************
************

Reply via email to