Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rule for Hex numbers
Message
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
00581180
Message ID:
00581418
Views:
31
>I want to store nic addresses for example 00-A0-B7-34-F3-23.

You could create a CHECK constraint on the table as

CREATE TABLE foo (
...
NICAddr nchar(17) CHECK (NICAddr LIKE '[0-9A-F][0-9A-F]-[0-9A-F][0-9A-F]-[0-9A-F][0-9A-F]-[0-9A-F][0-9A-F]-[0-9A-F][0-9A-F]-[0-9A-F][0-9A-F]'),
... )

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform