Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming convention for constraint
Message
From
12/03/2010 17:20:47
 
General information
Forum:
Microsoft SQL Server
Category:
Database management
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01454231
Message ID:
01454252
Views:
26
>>>>In the book I use (SQL 2005 Unleashed) the author is using the following naming convention for UNIQUE constraint:
>>>>AK_TABLENAME_FIELDNAME
>>>>
>>>>Do you think AK stands for Alternative Key? Or what else could it be?
>>>>
>>>>Also, how important and where do you use the names of constraints (other than when you create them)?
>>>
>>>If you need to drop a constraint, you need a name.
>>
>>I understand. But it is not used anywhere in my code, right? That is, if a constrained stops the update does the error message contain the constraint name? (if so, the user will see it and there it is important).
>
>As far as I remember, the constraint name is not shown in the error messages. Though, it is easy to test - just try inserting bad data.

Bad data is my middle name; so I won't even have to try <g>.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform